Home arrow Forums
OSDEV Forums  


Mike359
User

Senior Osdever
Posts: 27
graphgraph
Karma: 1  
A very "enraging" problem - 2006/09/26 19:28 Ryu and I were attempting to figure out why the C/C++ portion of my kernel was not working.

It turns out it is an Watcom and a JLOC problem. Something about the DSGROUP methods. I have no idea what they are but there are preventing me from having pointers and may also be causing my function calls crash the system.

Is there a way to override this or allow Jloc to override this?
  | | The administrator has disabled public write access.
OSDEV
Community
Advertisement
   
gaf
User

Platinum Osdever
Posts: 153
graph
Karma: 10  
Re:A very "enraging" problem - 2006/09/27 10:02 I have no idea what DS GROUP are but there are preventing me from having pointers and may also be causing my function calls crash the system.
You are sure that the old linking issue is really fixed ? Both funtion calls and pointers can't work if the kernel's offset is not correct. Whatever you put in your main function is addressed relativly and thus won't have any problems with a broken base address. Global variables won't be initialized when your kernel gets loaded - except for that they should however work (at least most of the time).

JLOC is not really what one would consider a well documented and wide-spread tool. As there are obviously no other users that could explain it, you'll just have to find out how it works yourself.

You could also just switch to a different linker or compiler. Watcom's native linker wlink could be an alternative if you're going to use GRUB anyway. For a homebrew boot-loader it's probanly less suited as there's no possibility to output raw binary files. The other alternative is the gcc compiler..

regards,
gaf
  | | The administrator has disabled public write access.
Mike359
User

Senior Osdever
Posts: 27
graphgraph
Karma: 1  
Re:A very "enraging" problem - 2006/09/28 16:16 I suspose I could use Watcoms linker and then use EXE2Bin? But when I did that there was no application starting address. I wonder if it be possible to use 2 linkers

Post edited by: Mike359, at: 2006/09/28 17:23
  | | The administrator has disabled public write access.
gaf
User

Platinum Osdever
Posts: 153
graph
Karma: 10  
Re:A very "enraging" problem - 2006/09/30 06:51 To me it seems as if exe2dos was a DOS tool only works with real-mode code and some ancient exe format. Probably it's just not capable of converting your 32bit kernel..

What version of Watcom are you actually using ? In the changlog of OpenWatcom 1.4 it says that flat binaries are now supported by the linker:

Support for raw binary and Intel Hex output has been added to the linker, along with support for 24-bit segmented addressing architectures (HSHIFT option) and arbitrary class/segment reordering (OUTPUT and ORDER directives). See Linker Guide for details.

regards,
gaf
  | | The administrator has disabled public write access.

A WebArticles site. Sponsored by Evoleto. Motorola V525 / Business Directory / Delaware Incorporation / Home Made Bazaar