sergei
|
129d737523
+ Allow TObjRelocation to be created without a symbol, such relocations are being used to tag specific positions on non-x86 targets.
|
12 năm trước cách đây |
sergei
|
a730830c19
* Factored code for allocating GOT slots into TElfExeOutput.AllocGOTSlot.
|
12 năm trước cách đây |
sergei
|
a7e7d97da6
* ELF linker: fixed written values of STT_TLS symbols, they must be relative to PT_TLS segment address.
|
12 năm trước cách đây |
sergei
|
0369a30f49
* Internal linker: made sec_rodata_norel read-only.
|
12 năm trước cách đây |
sergei
|
2c011312db
* Changed TElf32Header and TElf64Header definitions, making them look closer to canonical ones (first 16 bytes are a single array field, addressable via EI_xx indices).
|
12 năm trước cách đây |
sergei
|
1aea22a6ca
+ Internal linker: generic and ELF-specific support for grouped sections, allow same symbol to be defined in several COMDAT groups.
|
12 năm trước cách đây |
sergei
|
277200e7ae
+ ELF linker: Support writing RELATIVE dynamic relocations ahead of the rest, and their number in DT_REL[A]COUNT dynamic tag (still needs changes in CPU-specific code to function properly).
|
13 năm trước cách đây |
sergei
|
d019670495
- Removed generic implementation of TObjData.sectionname, its existence is useless because it is completely overridden by all TObjData descendants.
|
13 năm trước cách đây |
sergei
|
4410fe86d2
* ELF linker: moved some code (which must be executed only once when linking with separate debug file) from MemPos_Start into AfterUnusedSectionRemoval, this removes some checks and simplifies things.
|
13 năm trước cách đây |
sergei
|
6023f73e2a
* ELF linker: improved dynamic symbol handling.
|
13 năm trước cách đây |
sergei
|
6d70009f06
+ ELF linker. Works on x86_64-linux and i386-linux good enough to pass the testsuite, but still requires a lot of work in nearly all aspects. In particular, no attempt to resolve symbols from shared libs is done, everything is just treated as imports. Symbol versioning isn't supported either.
|
13 năm trước cách đây |
sergei
|
339d06aa58
* When writing section names of .o files, let sh_name of sections with relocations point into names of corresponding relocation sections past the .rel/.rela prefix. In case of smartlinked sections this saves almost half of .shstrtab section size.
|
13 năm trước cách đây |
sergei
|
c41b407119
* Changed TObjSection.WriteStr method to write a zero byte after the string.
|
13 năm trước cách đây |
sergei
|
c529356693
* Split most CPU-specific code from ogelf.pas into newly created cpuelf.pas units in CPU subdirectories.
|
13 năm trước cách đây |
sergei
|
f14e038172
+ Implemented writeReloc_internal method for TElfObjSection.
|
13 năm trước cách đây |
sergei
|
95535ea845
- Do not create any default object sections. On targets with section-based smartlink these sections remain empty and only cause linker to do useless job of removing them. The same happens when loading object files because duplicate section names are allowed at that time. On targets without smartlink they don't stay empty, but the internal assembler creates sections when required, so not creating initial sections effectively doesn't change anything.
|
13 năm trước cách đây |
sergei
|
944189f046
- don't supply sh_link and sh_info members to TElfObjSection.create_ext.
|
13 năm trước cách đây |
sergei
|
d4b7a6a9bd
+ Added some more ELF definitions
|
13 năm trước cách đây |
sergei
|
3b3da49ad6
* Merged TElfObjSection.secshidx and TCoffObjSection.secidx into TObjSection.index.
|
13 năm trước cách đây |
sergei
|
27f342225a
* Changed most fields of ELF structures to unsigned, to conform to their official declarations.
|
13 năm trước cách đây |
sergei
|
712f5d1c26
- Removed oso_readonly and oso_noload section options, it is enough to have just oso_write and oso_load to express possible section states.
|
13 năm trước cách đây |
sergei
|
37b8cd1b7a
* If relocation to a local label cannot be translated into (section+offset), then the target symbol must be written into symbol table. Fixes IE 200603012 in number of tests with -Cg on i386-linux (and possibly other targets with internal ELF assembler).
|
13 năm trước cách đây |
sergei
|
1284be72ea
* Fixed alignment of '.data' section, which got accidentally changed from 16 to 8 by r21374, causing e.g. tests/test/tasm3.pp to crash if compiled without -Cg and on target without tf_smartlink_sections. The root problem is not here, however: if appending data with higher alignment to a section with lower alignment, we likely need to raise the alignment of section.
|
13 năm trước cách đây |
sergei
|
bd7ebdce18
* ELF relocation cleanup/improvement:
|
13 năm trước cách đây |
sergei
|
85f6062e05
* Reworked writing ELF symbols into a separate class, TElfSymtab, which is also suitable for creating symbol tables in executable and dynamic ELF files.
|
13 năm trước cách đây |
sergei
|
d0df2b247b
* ogelf.pas: pass objdata into TElfObjSection.create_ext, so sections created via create_ext are 'owned' the same way as ones created via objData.CreateSection.
|
13 năm trước cách đây |
sergei
|
cc5fda2a1e
+ ogelf.pas: added definitions for program headers and .dynamic section, and reformatted existing ones to reduce line count.
|
13 năm trước cách đây |
sergei
|
7d3294b504
* Moved 4 procedures for basic reading/writing TObjSection contents into ogcoff.pas, so they don't have to be reimplemented for every output format.
|
13 năm trước cách đây |
sergei
|
263b46be86
* ogelf.pas: Changed MaybeSwap* into procedures, makes them more suitable for reuse in the upcoming reader (and reduces amount of copying while writing, too).
|
13 năm trước cách đây |
sergei
|
747cd55b09
* Fixed 64-bit ELF program header definition (field order is different from 32-bit counterpart!)
|
13 năm trước cách đây |