nickysn
f4e26f382f
+ added an 'index' field to TObjSectionGroup, specifying the index of the group
...
in the object file (similar to TObjSection.index, but for groups, instead of
sections). Set the new index field, when writing .obj files with the internal
omf object writer.
git-svn-id: trunk@39269 -
2018-06-21 15:51:58 +00:00
nickysn
ab47c8b899
+ introduce the omf_section_primary_group function. Use it instead of
...
section_belongs_to_dgroup, to allow sections to belong to groups, other than
dgroup.
git-svn-id: trunk@39268 -
2018-06-21 13:21:53 +00:00
nickysn
5eb69edf9e
+ support segments (sections) with a primary group, other than 'DGROUP' in the
...
OMF internal object writer
git-svn-id: trunk@39245 -
2018-06-20 14:57:20 +00:00
nickysn
7fcec8460f
+ parse OMF COMENT records when reading object files and produce error messages
...
for the records that are not supported, but are important for the executable
being produced (such as weak/lazy externals, etc.)
git-svn-id: trunk@39241 -
2018-06-18 14:48:04 +00:00
nickysn
3aff9d6735
* set MemPos to 0 for each debug .MZ section. This fixes all references within
...
the debug sections themselves.
git-svn-id: trunk@39235 -
2018-06-15 14:49:43 +00:00
nickysn
84b5265312
+ append a TIS trailer after the debug ELF (this helps the watcom debugger find
...
the beginning of the ELF debug image)
git-svn-id: trunk@39229 -
2018-06-15 13:41:40 +00:00
nickysn
480eedac9f
* fix/pretty print the segment and group list with too long segment/group/class
...
names in the linker map file, produced by the i8086 internal linker
git-svn-id: trunk@39228 -
2018-06-15 00:03:58 +00:00
nickysn
8af56ad6c8
* fixed silly (caused by copy/paste) bug when writing elf section contents in the dwarf debug binary, produced by TMZExeOutput.writeDebugElf
...
git-svn-id: trunk@39227 -
2018-06-14 16:29:25 +00:00
nickysn
11cf2a6996
* emit a warning, when encountering an omf reference to a section, that has been
...
removed due to smartlinking
git-svn-id: trunk@39226 -
2018-06-14 16:22:47 +00:00
nickysn
c41f736958
+ allow MemPos_EndExeSection to be called with an empty section name
...
git-svn-id: trunk@39225 -
2018-06-14 16:17:00 +00:00
nickysn
97365abbcf
+ set the oso_debug flag to dwarf MZ exe sections
...
git-svn-id: trunk@39224 -
2018-06-14 16:15:11 +00:00
nickysn
239fb25179
+ assign an MZExeUnifiedLogicalSegment object to the OMF dwarf sections, so that
...
OMF relocations work on them too
git-svn-id: trunk@39223 -
2018-06-14 16:03:05 +00:00
nickysn
7103e3cb5c
+ set the oso_debug section flags when reading an OMF section, which belongs to
...
the 'DWARF' class
git-svn-id: trunk@39222 -
2018-06-14 15:27:08 +00:00
nickysn
c56ebad183
+ implemented writing of dwarf debug info (by calling writeDebugElf) in
...
TMZExeOutput.writeData. Note that writing i8086 debug info with the internal
linker is still disabled (i.e. it switches to external linking) in
options.TOption.checkoptionscompatibility
git-svn-id: trunk@39219 -
2018-06-14 14:30:59 +00:00
nickysn
29b3ec3fdb
* call MaybeSwapHeader and MaybeSwapSecHeader in TMZExeOutput.writeDebugElf, so
...
the debug ELF file is generated with the correct endianness
git-svn-id: trunk@39218 -
2018-06-14 13:02:54 +00:00
nickysn
daa47f4b7f
+ completed the internal debug ELF writer in TMZExeOutput.writeDebugElf (not
...
enabled yet)
git-svn-id: trunk@39216 -
2018-06-13 16:08:54 +00:00
nickysn
420a57ddc6
* use upper case OMF section names when using i8086 section-based smart linking
...
git-svn-id: trunk@39212 -
2018-06-12 00:14:08 +00:00
nickysn
b9ab9e5782
+ initial (experimental) implementation of section-based smartlinking for i8086.
...
Use -dI8086_SMARTLINK_SECTIONS to enable.
git-svn-id: trunk@39211 -
2018-06-11 16:56:33 +00:00
nickysn
bfdd75eabf
+ support AB_LOCAL symbols in OMF object files, by implementing support for
...
LPUBDEF/LPUBDEF32 OMF records
git-svn-id: trunk@39210 -
2018-06-11 15:29:23 +00:00
nickysn
e6a8c058e0
* moved the handling of LIDATA OMF records (which currently only produces a
...
'LIDATA records are not supported' error) to TOmfObjInput.ReadLeOrLiDataAndFixups
git-svn-id: trunk@39171 -
2018-06-04 14:20:07 +00:00
nickysn
02fc2827e0
* TOmfObjInput.ReadLEDataAndFixups renamed ReadLeOrLiDataAndFixups
...
git-svn-id: trunk@39170 -
2018-06-04 14:10:11 +00:00
nickysn
e410a0aefb
+ support OMF FIXUPP records, containing only THREAD subrecords to occur without
...
a preceding LEDATA or LIDATA record (this is allowed by the OMF spec)
git-svn-id: trunk@39169 -
2018-06-04 14:00:36 +00:00
nickysn
002b116322
* use a case statement, instead of 'if', based on the OMF record type in
...
TOmfObjInput.ReadLEDataAndFixups. This is to allow (in the future) handling of
LIDATA records and FIXUPP records without preceding LEDATA/LIDATA. No
functional changes in this commit.
git-svn-id: trunk@39166 -
2018-06-04 13:11:55 +00:00
nickysn
98634899f2
+ support OMF fixups, determined by thread
...
git-svn-id: trunk@39151 -
2018-05-30 15:49:27 +00:00
nickysn
2fb73de404
+ support reading OMF files with THREAD FIXUPP subrecords; note that fixups,
...
determined by thread are still not yet implemented
git-svn-id: trunk@39150 -
2018-05-30 14:30:54 +00:00
nickysn
ebecfb1ce9
+ added a FFixupThreads property with a TOmfThreads object to TOmfObjInput
...
git-svn-id: trunk@39149 -
2018-05-30 14:10:12 +00:00
nickysn
f505718e6c
+ started implementing TMZExeOutput.writeDebugElf; nothing is written yet, only
...
the elf header fields are filled with the values, generated by wlink
git-svn-id: trunk@39115 -
2018-05-25 14:20:13 +00:00
pierre
f80e73eac2
Remove references to sym variable when not set (revealed warning generated when compiling with -O4 option)
...
git-svn-id: trunk@39101 -
2018-05-23 20:45:21 +00:00
nickysn
8c842c1337
* changed the type of the 'size' parameter of TOmfObjOutput.AddSegment to
...
TObjSectionOfs instead of aword
git-svn-id: trunk@39093 -
2018-05-22 13:48:55 +00:00
nickysn
f5862efcd4
+ support writing 32-bit LEDATA OMF records
...
git-svn-id: trunk@39092 -
2018-05-22 13:23:56 +00:00
nickysn
ca50b14e21
* set the omf section size limit to 32-bit for the dwarf debug sections
...
git-svn-id: trunk@39088 -
2018-05-22 12:41:51 +00:00
nickysn
600b460ecd
+ added new debug output option -godwarfomflinnum for generating line number
...
information in OMF LINNUM records, in addition to the DWARF debug information.
This enables source level debugging on i8086-msdos, when using the Open Watcom
Debugger, provided the source was compiled with this option and the external
linker (wlink) was used for generating the executable (the internal linker
does not yet support generating debug information).
git-svn-id: trunk@39014 -
2018-05-17 14:38:50 +00:00
nickysn
3d6d020fca
+ implemented the actual writing of LINNUM OMF records
...
git-svn-id: trunk@39008 -
2018-05-16 17:37:28 +00:00
nickysn
b80642c384
+ started implementing support for generating Microsoft CodeView debug
...
information. Only enabled on i8086 (for now). Does not do much yet, but
hopefully, soon it'll start emitting line number information for i8086-msdos
that is usable by DOS debuggers.
git-svn-id: trunk@39006 -
2018-05-16 15:25:33 +00:00
nickysn
718e83954f
* merge duplicate strings in the LNAMES section, when writing OMF object
...
modules. This results in slightly smaller obj files.
git-svn-id: trunk@38967 -
2018-05-10 13:07:32 +00:00
nickysn
65c2575883
+ added win16stub const array (small dos exe, which prints 'This program
...
requires Microsoft Windows.'). Will be used by the future win16 internal
linker.
git-svn-id: trunk@37775 -
2017-12-21 15:00:43 +00:00
nickysn
7763942907
* fixed the 'Unsupported fixup location type' error messages in the MZ internal
...
linker
git-svn-id: trunk@37631 -
2017-11-28 02:29:28 +00:00
nickysn
2af5c9d508
* changed type used for section alignment from byte/shortint to longint, so the
...
internal object writer and the internal linker support object files with
sections with alignment >=256
git-svn-id: trunk@37518 -
2017-10-25 15:47:29 +00:00
florian
e7fd71db36
+ write name of segment/group which is too large
...
git-svn-id: trunk@35456 -
2017-02-19 19:15:18 +00:00
nickysn
c2305809dc
+ added an i8086-embedded target support to the compiler (RTL and makefile
...
support are not done yet)
git-svn-id: trunk@33999 -
2016-06-17 19:15:24 +00:00
florian
90b284e169
+ generate .debug_aranges sections for dwarf debug info: enables faster address to debug info translation
...
git-svn-id: trunk@33454 -
2016-04-08 20:19:59 +00:00
nickysn
db5e67c3fe
+ introduced a new type TRelocDataInt for use as the 'data' parameter for
...
TObjData.writeReloc; on i8086 it was changed to longint to allow using 32-bit
relocations
+ added support for writing 32-bit OMF relocations
git-svn-id: trunk@32936 -
2016-01-13 17:57:36 +00:00
nickysn
4f8baf29c6
+ handle RELOC_FARPTR48 relocations as well in TOmfObjData.writeReloc; this is
...
not used yet, but is added for completeness (and might be useful, if we add an
i386 target, that uses the OMF object format)
git-svn-id: trunk@32935 -
2016-01-13 15:07:41 +00:00
nickysn
e628729e1d
+ support 48-bit (16:32) far pointer relocations in the OMF internal linker
...
git-svn-id: trunk@32928 -
2016-01-11 17:50:27 +00:00
nickysn
02a6b77e32
+ added support for 32-bit offset OMF relocations (fltOffset32) in the OMF internal linker
...
git-svn-id: trunk@32927 -
2016-01-11 17:34:56 +00:00
nickysn
c8e20dfe74
+ added i8086-specific consts RELOC_ABSOLUTE16 and RELOC_RELATIVE16, which are
...
aliases for RELOC_ABSOLUTE and RELOC_RELATIVE
* use RELOC_ABSOLUTE16 and RELOC_RELATIVE16, instead of RELOC_ABSOLUTE and
RELOC_RELATIVE in the linker-related parts of the OMF support (OMF object
reader and MZ exe output). This will make the code more readable, when 32-bit
relocation support is added to the linker. It will also make easier to reuse
this code for i386, in case we add an i386 target, that uses the OMF object
format.
git-svn-id: trunk@32923 -
2016-01-11 15:24:34 +00:00
nickysn
b9ca24d4df
+ added property to the omf object reader, specifying whether symbol names
...
should be case sensitive (on by default, for now)
git-svn-id: trunk@32435 -
2015-11-21 15:35:42 +00:00
nickysn
d5428ee210
* the CaseSensitive property in TOmfObjInput renamed CaseSensitiveSegments,
...
because it only applies to segments/groups/overlays and not symbols.
git-svn-id: trunk@32389 -
2015-11-21 11:25:21 +00:00
nickysn
e4b77c7aab
* accept omf object modules, containing LINNUM and LINNUM32 records in the
...
i8086-msdos internal linker
git-svn-id: trunk@32382 -
2015-11-20 17:41:35 +00:00
nickysn
30a7875d56
+ added hack for supporting linking with .obj files, generated by Borland's
...
binobj tool with the i8086-msdos internal linker
git-svn-id: trunk@32381 -
2015-11-20 17:40:34 +00:00
nickysn
0d48e5f6c7
+ added support to the omf/i8086-msdos internal linker for omf relocation with
...
location type 3 (fltFarPointer). This isn't generated by nasm, nor by the
internal object writer (yet), but may be generated by other
assemblers/compilers - TASM generates it (tested with it), MASM probably also
does.
git-svn-id: trunk@32346 -
2015-11-16 14:51:05 +00:00
nickysn
b744c83581
+ implemented support for omf fixup records with target group other than 'DGROUP' in the i8086-msdos internal linker
...
git-svn-id: trunk@32294 -
2015-11-12 16:40:17 +00:00
nickysn
7d41d19150
+ added an error message when trying to compile a tiny model DOS .COM file with
...
segment relocations
git-svn-id: trunk@32276 -
2015-11-08 21:13:16 +00:00
Jonas Maebe
5f7b242222
* fixed compilation with -Oodfa/-O3
...
git-svn-id: trunk@31679 -
2015-09-14 16:10:57 +00:00
Jonas Maebe
991e1f49bd
* store a pointer to the used tasminfo record in every assembler writer, so
...
that we can use assembler writers with different conventions from the
currently set target_asm (e.g. an x86 assembler writer for inline assembly
in LLVM IR)
git-svn-id: trunk@31628 -
2015-09-12 23:32:13 +00:00
nickysn
393d86a2e5
+ implemented writing proper win16 dll import libraries
...
git-svn-id: trunk@31532 -
2015-09-05 13:45:23 +00:00
nickysn
1487236f29
+ support addr_fardataseg references in the internal asm writer
...
git-svn-id: trunk@31511 -
2015-09-04 14:33:48 +00:00
nickysn
4a855b140a
+ support mixing initialized and bss data in the same object section (only in
...
case the section options contain the new option 'oso_sparse_data') in the
internal object writer (needed for the huge memory model)
git-svn-id: trunk@31503 -
2015-09-04 13:16:45 +00:00
nickysn
2725b1160b
* name the 'FAR_DATA' class segments as module_name+'_DATA'
...
git-svn-id: trunk@31499 -
2015-09-03 19:00:55 +00:00
nickysn
cfab5d3d3e
* the omfbase.omf_segclass const array converted to function in order to be able
...
to return different names for some sections in the huge memory model
git-svn-id: trunk@31496 -
2015-09-03 17:48:07 +00:00
nickysn
cc2e27b555
* the function which returns the alignment of omf sections moved to unit
...
omfbase, so it can be used by the nasm asm writer as well
git-svn-id: trunk@31486 -
2015-09-03 12:36:58 +00:00
nickysn
3abfa177c4
* initialization of stack and dwarf debug omf sections moved from
...
TOmfObjSection.create to TOmfObjData.createsection and is now based on the
section type (TAsmSectionType) instead of name (string)
git-svn-id: trunk@31485 -
2015-09-03 11:38:51 +00:00
nickysn
efef3882a0
* moved the code for determining whether an omf object section should
...
belong to group DGROUP to a function in unit omfbase (so it can be used in the
future by the nasm asm writer as well)
git-svn-id: trunk@31484 -
2015-09-02 16:11:02 +00:00
nickysn
2e6d462ff6
* omf segment class names moved to a const array in omfbase, so they can be used
...
(in the future) in the nasm asm writer as well
git-svn-id: trunk@31483 -
2015-09-02 14:37:20 +00:00
nickysn
4061628ffb
* the i8086-msdos default code segment (in near code memory models) renamed
...
'_TEXT'. This name is used in object modules, produced by Borland C and Open
Watcom.
git-svn-id: trunk@31482 -
2015-09-02 13:14:12 +00:00
nickysn
1a8e203bf5
* moved the omf section names constant to the omfbase unit and use it also in
...
the nasm asm writer when targeting i8086-msdos
git-svn-id: trunk@31481 -
2015-09-02 12:28:46 +00:00
nickysn
919cc8377a
+ added class type property CObjSymbol to TExeOutput as well
...
git-svn-id: trunk@31426 -
2015-08-25 16:07:59 +00:00
nickysn
19aab3fd31
+ i8086-msdos internal linker: write symbol addresses in segment:offset format in the linker map file
...
git-svn-id: trunk@31425 -
2015-08-25 14:48:08 +00:00
nickysn
f41692710f
- removed bogus comment from TMZExeUnifiedLogicalSegment.CalcMemPos
...
git-svn-id: trunk@31423 -
2015-08-25 14:04:51 +00:00
nickysn
2467cb34c2
* fixed MemBasePos calculation for segments that go beyond the previous segment base
...
git-svn-id: trunk@31421 -
2015-08-25 13:06:50 +00:00
nickysn
2c05bcc28f
+ i8086-msdos internal linker: in the far data memory models, fill
...
MaxExtraParagraphs in the MZ exe header according to the specified max heap
size
git-svn-id: trunk@31420 -
2015-08-25 11:40:02 +00:00
nickysn
dad0f015a9
- removed the TOmfObjSectionGroup class, because it is not used
...
git-svn-id: trunk@31419 -
2015-08-25 11:32:30 +00:00
nickysn
6e20e0fc84
+ added checks and error messages in case a 16-bit segment or group exceeds 64k
...
git-svn-id: trunk@31416 -
2015-08-25 01:01:20 +00:00
nickysn
851ebd9850
* use a normalized MemBasePos (i.e. offset<16) for stack segments
...
git-svn-id: trunk@31415 -
2015-08-25 00:29:02 +00:00
nickysn
fb1be14337
* yet another fix for the MZ relocation offsets
...
+ support RELOC_SEG and RELOC_SEGREL relocations pointing to an object section
git-svn-id: trunk@31412 -
2015-08-24 23:40:07 +00:00
nickysn
faa9362b44
+ calculate and fill "min extra paragraphs" in the MZ header
...
git-svn-id: trunk@31403 -
2015-08-24 21:33:26 +00:00
nickysn
2100714ebe
+ implemented RELOC_SEG and RELOC_SEGREL fixups for a symbol target
...
* bug fix in the MZ relocation generated for RELOC_DGROUP/RELOC_DGROUPREL
relocations
* reduced code duplication in TMZExeOutput.DoRelocationFixup a little by using
nested procedures
git-svn-id: trunk@31401 -
2015-08-24 21:12:26 +00:00
nickysn
0eb1cd157a
* don't subtract two from the end of the stack segment when calculating the
...
initial SP value - seems to be wlink compatible
git-svn-id: trunk@31399 -
2015-08-24 20:22:01 +00:00
nickysn
2431b6e63b
* i8086-msdos internal linker: use a different approach for finding the stack
...
segment - either its class name must be 'STACK' (wlink compatible) or its
combine type must be scStack (tlink compatible)
git-svn-id: trunk@31398 -
2015-08-24 20:18:44 +00:00
nickysn
d2a47a7c69
+ fill the initial stack address in the MZ exe header
...
git-svn-id: trunk@31396 -
2015-08-24 18:28:00 +00:00
nickysn
18cdc08c26
+ prevent certain special omf sections from being smartlinked out
...
git-svn-id: trunk@31394 -
2015-08-24 18:10:50 +00:00
nickysn
fe69e3324c
+ implemented RELOC_DGROUP and RELOC_DGROUPREL in TMZExeOutput.DoRelocationFixup
...
git-svn-id: trunk@31393 -
2015-08-24 17:55:44 +00:00
nickysn
0eda4c954d
+ handle omf references to a segment with frame method=target
...
git-svn-id: trunk@31392 -
2015-08-24 17:34:04 +00:00
nickysn
e88dc71983
+ import DGROUP omf fixup references
...
git-svn-id: trunk@31390 -
2015-08-24 16:53:44 +00:00
nickysn
73ea3b7ff1
+ implemented fixups targeting a logical segment offset in the omf internal linker
...
git-svn-id: trunk@31389 -
2015-08-24 15:50:47 +00:00
nickysn
3d3eb6c472
* stop with an error when encountering omf fixups that aren't yet implemented
...
git-svn-id: trunk@31388 -
2015-08-24 15:20:59 +00:00
nickysn
d7f08866e5
* use the TMZExeOutput.MZFlatContentSection property in TInternalLinkerMsDos.GetTotalSizeForSegmentClass
...
instead of finding the exe section by name
git-svn-id: trunk@31387 -
2015-08-24 15:09:35 +00:00
nickysn
449506ffb7
+ write mz exe section data
...
+ fill MaxExtraParagraphs in the MZ header with $ffff by default, to prevent DOS
from loading the program at the highest possible address
git-svn-id: trunk@31386 -
2015-08-24 15:02:37 +00:00
nickysn
fdbfaacec8
+ calculate the MZ loadable image size (excluding bss, stack and heap)
...
+ only write the loadable image size number of bytes to .com files
git-svn-id: trunk@31385 -
2015-08-24 14:42:43 +00:00
nickysn
a7e63581b4
+ i8086-msdos internal lniker: find the program entry point and fill it in the
...
mz exe header; also write it in the linker map file
git-svn-id: trunk@31384 -
2015-08-24 14:22:17 +00:00
nickysn
e0bd25191e
+ also take into account the frame method when converting the omf start address to a symbol
...
git-svn-id: trunk@31383 -
2015-08-24 13:46:37 +00:00
nickysn
cff94639d5
* i8086-msdos internal linker: improved handling of the _edata and _end internal
...
symbols - add them to 'DGROUP' and define them in a section with class 'BSS'
git-svn-id: trunk@31382 -
2015-08-24 12:39:39 +00:00
nickysn
989afc6ecb
* show section addresses relative to the segment's MemBasePos in the i8086-msdos
...
internal linker map file
git-svn-id: trunk@31380 -
2015-08-24 01:31:16 +00:00
nickysn
fa8841d575
+ support omf group-relative fixups pointing to external symbol (e.g.
...
'wrt dgroup' references)
- removed debug code from TMZExeOutput.DoRelocationFixup
git-svn-id: trunk@31378 -
2015-08-24 00:55:56 +00:00
nickysn
173713ce57
* preserve original order (as specified in the link script) of omf sections with
...
the same name. This ensures that the startup code always comes first, which is
important for .com files
git-svn-id: trunk@31377 -
2015-08-24 00:30:24 +00:00
nickysn
f08e98bfd0
+ partial implementation of DoRelocationFixups for the i8086-msdos internal linker
...
git-svn-id: trunk@31375 -
2015-08-24 00:23:56 +00:00
nickysn
78cbb1ba2b
+ implemented writing .com files in the i8086-msdos internal linker
...
git-svn-id: trunk@31374 -
2015-08-23 22:06:30 +00:00
nickysn
fa9a1f706b
+ i8086-msdos internal linker: calculate the final segments and groups locations
...
in memory (incl. segment bases) before DoRelocations; list segments and groups
in the map file as well
git-svn-id: trunk@31373 -
2015-08-23 21:36:24 +00:00
nickysn
5dc42404cf
* capitalize omf segment class names, as that's how other 16-bit compilers write them
...
git-svn-id: trunk@31371 -
2015-08-22 19:07:04 +00:00
nickysn
e09ab50724
* capitalize the group name 'DGROUP' in the generated omf object files, because
...
that's how it is usually written by other 16-bit compilers
git-svn-id: trunk@31369 -
2015-08-22 16:28:36 +00:00
nickysn
70677e3e44
+ added a descendant class for omf section groups, which adds base address, size
...
and a method to calculate these new fields
git-svn-id: trunk@31363 -
2015-08-22 12:23:49 +00:00
nickysn
9aeb94676c
+ added virtual method to tobjsection for returning a string representation of
...
the section's base address for the internal linker map file
* implemented it for omf sections to return the address in 'seg:ofs' format
git-svn-id: trunk@31359 -
2015-08-21 16:21:16 +00:00
nickysn
808b5dfb78
* allow gaps between LEDATA records, as nasm seems to produce them. They're
...
automatically filled with zeros. This fixes reading of the tiny memory model
startup code object module by the i8086-msdos internal linker.
git-svn-id: trunk@31354 -
2015-08-20 22:57:15 +00:00
nickysn
1b9eeee25d
+ order omf sections first by classname, then by name
...
git-svn-id: trunk@31352 -
2015-08-20 21:21:52 +00:00
nickysn
7d586df038
* override DoRelocationFixup in TMZExeOutput - doing nothing for now, but
...
prevents the "abstract method called" error
git-svn-id: trunk@31350 -
2015-08-20 20:55:24 +00:00
nickysn
0fb92b803b
* set the MZ exe section limit to 640k
...
git-svn-id: trunk@31348 -
2015-08-20 15:01:39 +00:00
nickysn
07fff73527
* fixed the "Incompatible section options" error when using the omf internal linker to produce msdos executables
...
git-svn-id: trunk@31347 -
2015-08-20 14:50:59 +00:00
nickysn
a4c188ff01
+ partial implementation of omf fixup reading
...
git-svn-id: trunk@31346 -
2015-08-19 15:55:03 +00:00
nickysn
6d6ed840a4
* set the data record start offset of the omf fixup object when reading omf fixups
...
git-svn-id: trunk@31342 -
2015-08-18 15:18:03 +00:00
nickysn
cbc676e80e
* ignore case (i.e. always convert to upper case) in omf segment/class/overlay/group names
...
git-svn-id: trunk@31340 -
2015-08-18 14:41:29 +00:00
nickysn
d4b0b6f6e6
* use SegmentName+'||'+ClassName for the name of OMF sections when reading OMF
...
files, because omf segments are (according to the spec) identified by the
tuple <SegmentName,ClassName,OverlayName> and not just by name (and we ignore
the overlay name)
git-svn-id: trunk@31339 -
2015-08-18 14:31:59 +00:00
nickysn
9ff0057a94
* return true if TOmfObjInput.ReadObjData is successful
...
git-svn-id: trunk@31336 -
2015-08-17 12:25:59 +00:00
nickysn
ef207475fd
+ parse omf modend records and add symbol for module start address
...
git-svn-id: trunk@31324 -
2015-08-14 15:42:43 +00:00
nickysn
e59c164844
+ parse FIXUPP records in the omf object reader (although converting them TOmfRelocation is not yet implemented)
...
git-svn-id: trunk@31320 -
2015-08-13 13:44:46 +00:00
nickysn
0cd1a88588
* fixed memory leak in TOmfObjInput.ReadExtDef
...
git-svn-id: trunk@31313 -
2015-08-11 13:39:26 +00:00
nickysn
9fc100574c
+ added property TObjSymbol.group for use with the omf object format
...
git-svn-id: trunk@31312 -
2015-08-11 13:38:28 +00:00
nickysn
c50991713c
+ implemented reading of omf public names
...
git-svn-id: trunk@31311 -
2015-08-11 13:04:22 +00:00
marco
8d145ce706
* initialize secalign before case statement to avoid warning. Mantis #28326
...
git-svn-id: trunk@31145 -
2015-06-22 11:48:42 +00:00
nickysn
318874837f
+ implemented 16-bit dos MZ exe header writer
...
git-svn-id: trunk@31002 -
2015-06-07 14:31:02 +00:00
nickysn
2c1049b5d4
+ read the LEDATA omf records (i.e. the actual section data)
...
git-svn-id: trunk@30975 -
2015-06-04 23:03:22 +00:00
nickysn
d0d3cef868
+ implemented reading of omf extdef (external symbols) records
...
git-svn-id: trunk@30973 -
2015-06-03 13:07:48 +00:00
nickysn
096743d74d
+ also read the omf segment size and set objsec.Size
...
git-svn-id: trunk@30971 -
2015-06-01 23:31:53 +00:00
nickysn
1cae939615
+ implemented parsing of omf group definitions as well
...
git-svn-id: trunk@30970 -
2015-06-01 23:03:48 +00:00
nickysn
5539d6366f
+ implemented reading of SEGDEF omf records
...
git-svn-id: trunk@30969 -
2015-06-01 21:28:55 +00:00
nickysn
28f7f16fc7
+ implemented reading of the LNAMES omf record
...
git-svn-id: trunk@30968 -
2015-06-01 14:25:51 +00:00
nickysn
be57d4900d
+ started implementing TOmfObjInput.ReadObjData - we go through the expected
...
records and read them (without parsing them yet) and verify their checksums
git-svn-id: trunk@30965 -
2015-05-31 22:32:54 +00:00
nickysn
8515160e9d
+ set CObjData in the TMZExeOutput constructor
...
git-svn-id: trunk@30866 -
2015-05-15 22:35:32 +00:00
nickysn
29a1c74e34
+ implemented TOmfObjInput.CanReadObjData
...
git-svn-id: trunk@30864 -
2015-05-15 22:23:30 +00:00
nickysn
3b288554e7
+ more msdos internal linker classes added
...
git-svn-id: trunk@30811 -
2015-05-06 14:49:07 +00:00
nickysn
ced1368221
* fixed emitting of RELOC_SEG and RELOC_SEGREL relocations within the same
...
section in the omf internal obj writer
git-svn-id: trunk@30809 -
2015-05-06 10:40:38 +00:00
nickysn
328a4fa19a
+ optimization: don't emit relative relocation entries to the same section in
...
the omf obj writer
git-svn-id: trunk@30808 -
2015-05-06 10:05:15 +00:00
nickysn
b17087a645
- removed debug writelns after r30800
...
git-svn-id: trunk@30802 -
2015-05-04 17:13:17 +00:00
nickysn
f1252d7582
- removed unnecessary setting of TargetMethod and TargetDatum (since these are
...
always set in the following 'if' statement) in TOmfRelocation.BuildOmfFixup
git-svn-id: trunk@30801 -
2015-05-04 17:11:02 +00:00
nickysn
0da38dbc79
+ implemented support for the 'dgroup' (addr_dgroup) relocation type in the omf
...
internal object writer
git-svn-id: trunk@30800 -
2015-05-04 17:07:19 +00:00
nickysn
37840bc811
- removed commented out debug code from TOmfObjData.writeReloc
...
git-svn-id: trunk@30799 -
2015-05-04 16:24:28 +00:00
nickysn
7923b6142e
+ finished the internal omf library writer (implementing writing of the library
...
dictionary at the and of the file) and enabled it for the i8086 internal asm
git-svn-id: trunk@30701 -
2015-04-21 23:31:02 +00:00
nickysn
a365da0b44
+ added class (empty for now) TOmfLibObjectWriter and hook it as an internal ar
...
in the omf internal assembler constructor. Note it is not used yet, because of
the af_needar assembler flag.
git-svn-id: trunk@30698 -
2015-04-21 19:28:51 +00:00
nickysn
778a678956
* use a 4 byte alignment for the dwarf debug sections on i8086 (not sure if
...
that's correct for 16-bit dwarf, but currently the compiler emits 4-byte
tai_aligns, so setting the section alignment to 4 avoids problems in the
internal object writer)
git-svn-id: trunk@30685 -
2015-04-20 13:15:26 +00:00
nickysn
5a1ce6162b
* set the bss, rodata and rodata_norel section alignment to 2 bytes for the i8086-msdos target
...
git-svn-id: trunk@30680 -
2015-04-20 01:27:26 +00:00
nickysn
ae04eb258b
* when splitting the section data in chunks, make sure fixups never cross chunk boundaries
...
git-svn-id: trunk@30679 -
2015-04-20 00:02:40 +00:00
nickysn
7fca6dd6c1
* set the properties of the dwarf debug info sections in the omf obj writer
...
as required by wlink in order to be recognized and handled as debug info
(i.e. class=DWARF, use32)
git-svn-id: trunk@30636 -
2015-04-18 00:42:17 +00:00
nickysn
c407f61107
* generate the omf alignment based on the value of SecAlign, instead of
...
duplicating the code from sectiontype2align in the TOmfObjSection constructor
git-svn-id: trunk@30603 -
2015-04-15 08:55:19 +00:00
nickysn
d7416afd88
* override sectiontype2align in the omf writer and set the same alignments as
...
the ones, currently produced by nasm
git-svn-id: trunk@30602 -
2015-04-15 08:31:06 +00:00
nickysn
a7e059c875
+ support segment relocations in the omf writer
...
git-svn-id: trunk@30600 -
2015-04-14 22:46:01 +00:00
nickysn
03e8c3ae05
+ support RELOC_RELATIVE relocations in the omf object writer, by using omf's
...
"self relative" (instead of "segment relative") fixups. "Hello world" and
fpctris in the small memory model now work (under dosbox, at least) with the
internal object writer.
git-svn-id: trunk@30581 -
2015-04-13 22:44:31 +00:00
nickysn
3dd914a7b9
+ write the proper external symbol index in the omf FIXUPP records. WLink no
...
longer crashes when processing our obj files :)
git-svn-id: trunk@30528 -
2015-04-09 23:33:22 +00:00
nickysn
d8f04418be
+ write EXTDEF records in the omf output file
...
git-svn-id: trunk@30527 -
2015-04-09 23:27:45 +00:00
nickysn
8a831f4c7f
* always clear segments and groups in the beginning of TOmfObjOutput.writeData, because the same objects is used for creating multiple object files
...
git-svn-id: trunk@30516 -
2015-04-09 15:42:29 +00:00
nickysn
7ecb7f83e9
+ create omf fixups for external symbols (external symbol index not set yet)
...
git-svn-id: trunk@30514 -
2015-04-09 13:56:55 +00:00
nickysn
e1ae2d9387
+ create a symbol relocation for external symbols in TOmfObjData.writeReloc
...
git-svn-id: trunk@30512 -
2015-04-09 13:48:56 +00:00