Replies: 1 comment 7 replies
-
Please give here full wlink command because if you use dos as system then it cannot use flat model. If you do DGROUP group NOEMIT then no data will be emited, because all data segments are part of DGROUP group. Generaly note, first you need to deside what output form you will be using, binary or Intel hex format? below is example of linker MAP file for VirtualBox bios build
Appropriate linker command is (use binary output) wlink system dos debug all option quiet, nofarcalls, map, verbose, statics, symfile output raw offset=0xF0000 order clname DATA segaddr=0xF000 segment _DATA clname CODE segment _TEXT segaddr=0xF000 offset=0x1600 segment BIOS32 segaddr=0xF000 offset=0xDA00 segment BIOSSEG segaddr=0xF000 offset=0xE000 Name VBoxPcBios8086.rom Memory location is based on segment classes, you probably need on segments level. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am new to OW, x86, DOS and stuff so bear with me. What I have been toying around is linking ROMable 8086 code that makes use of large memory model and full 20-bit address space. I made few attempts of custom wlink.lnk mainly following the instructions in wikidoc's "lguide". I use dos as the format and option nodefaultlibs. I have tried raw bin but linking always bonkers (seems to assume flat memory model).
My DGROUP group is basically NOEMIT.. How do I make ORDER to copy the initialized '_DATA' segment (of DATA class) into the output binary? I must miss something fundamental of the 'copy_option'. According to the map file symbols as they should so my startup code could do the needed copying but nothing ends up into the emitted binary. The ROMDATA segment size is 0.
How do I place a specific object file always as the last object of the output binary using the wlink.lnk? Also, is there a way to make wlink not to output fillchars into NOEMIT segments?
EDIT: not outputting fillchars for NOEMIT is doable with OUTPUT directive. However, the calculation of the 'offset' seems to be bugged i.e. when defined it becomes 2's complement of the given value.
I have started to look into the linker code but it takes time before I get my head around it.
Beta Was this translation helpful? Give feedback.
All reactions