Commit Graph

259 Commits

Author SHA1 Message Date
Alligator-1
9caabdc4e7 Immediately set the capacity 2024-07-08 20:17:11 +00:00
Pierre Muller
ca6fe96360 Add writeInt8/writeUInt8 methods to fix some cross-endian generation issues 2024-02-19 20:19:35 +01:00
florian
4867d48e99 + support for .debug_loc and .debuc_loclist sections 2024-01-16 23:24:37 +01:00
Nikolay Nikolov
73895d3cbc + create relocation objects for R_WASM_TYPE_INDEX_LEB relocations in the wasm object reader 2023-12-28 21:23:08 +02:00
Nikolay Nikolov
791328ccb5 + auto add oso_data and oso_sparse_data when creating a .bss segment on the wasm target 2023-12-28 15:18:47 +02:00
Nikolay Nikolov
526de20d9a + introduced methods for writing endian-specific integers to TObjSection 2023-11-02 13:15:44 +02:00
Nikolay Nikolov
a028486325 + added methods for writing ints with specific endianess in TObjData 2023-11-02 11:59:17 +02:00
Pierre Muller
144ee6d51d Add missing swaping in case of different endianess of stab entry inside TInternalAssembler.WriteStab 2023-04-30 21:23:06 +02:00
florian
e26b298885 * patch by Rika: Better Align()'s #2, resolves #39512 2022-01-05 19:50:21 +01:00
Karoly Balogh
e018264ad9 internalerror if the section we're about to keep has no exesection assigned 2021-10-20 14:37:27 +02:00
Nikolay Nikolov
cdf1ceca76 * emit a weak symbol for the exception tag, since that's what the LLVM linker
wants to treat them as shared between .o files
2021-09-28 02:52:40 +03:00
Nikolay Nikolov
b463f2a141 + added support for exception tags and for the 'throw' and 'catch' instructions
in the wasm internal assembler and object writer
2021-09-27 21:44:09 +03:00
Nikolay Nikolov
2bce4d36db + proper support for WASM globals in the internal object writer - emit
relocations, generate a Global section, if they are declared in the object
  file, etc.
2021-09-27 04:24:49 +03:00
Nikolay Nikolov
07461d0fc3 * made the constructor of TObjSymbol virtual, so it can be overriden 2021-09-26 10:17:19 +03:00
Nikolay Nikolov
7f5250bf46 + implemented support for R_WASM_TABLE_INDEX_SLEB relocations 2021-09-26 06:22:41 +03:00
Nikolay Nikolov
9fa2e2934b + support the call_indirect instruction and the R_WASM_TYPE_INDEX_LEB
relocation that it requires in the internal wasm object writer
2021-09-26 06:03:18 +03:00
Nikolay Nikolov
83f2f7bf37 + introduced TObjData.SymbolPairDefine, to allow custom handling of symbol
pairs in the internal object writer
2021-09-26 03:56:56 +03:00
Nikolay Nikolov
b913133152 + implemented leb and sleb relocations to data symbols 2021-09-26 02:23:31 +03:00
Nikolay Nikolov
3e2a9b6ceb + handle the call instruction in the wasm binary writer 2021-09-20 05:03:38 +03:00
florian
9003114a8f + support R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX
git-svn-id: trunk@48156 -
2021-01-14 21:36:12 +00:00
florian
637976e83f * patch by Marģers to unify internal error numbers, resolves #37888
git-svn-id: trunk@47103 -
2020-10-13 19:59:01 +00:00
svenbarth
17d583a419 * fix for Mantis #37559: the adjustment of the section type should only be done for internal COFF writers
git-svn-id: trunk@46410 -
2020-08-13 05:42:41 +00:00
yury
985220d94c * Added virtual function TObjSection.GetAltName to be able to specify additional section name by descendants.
* OMF: Use the name of the first global symbol as an addition section name. This name is visible in the linker map file and helps tracking of section references.

git-svn-id: trunk@46298 -
2020-08-06 20:21:13 +00:00
nickysn
47ba80a545 * the len parameter of TObjData.writebytes changed to TObjSectionOfs to avoid 8-bit truncation on Z80
git-svn-id: trunk@45620 -
2020-06-07 23:05:13 +00:00
nickysn
9c54d753f5 * ImageBase changed to qword (same type as CurrMemPos) to avoid truncating to 8-bit on Z80
git-svn-id: trunk@45569 -
2020-06-02 23:07:45 +00:00
nickysn
e8af7427bb * the len parameter of TObjData.alloc changed to TObjSectionOfs
git-svn-id: trunk@45491 -
2020-05-25 00:16:38 +00:00
nickysn
616cb38292 * fixed the TRelocDataInt to avoid truncating 16-bit addresses to 8-bit on 8-bit CPUs
git-svn-id: trunk@45289 -
2020-05-06 02:52:28 +00:00
nickysn
997184778a + call ApplyAsmSymbolRestrictions for symbols that should be exported from ar files
git-svn-id: trunk@45285 -
2020-05-06 00:22:22 +00:00
nickysn
4fed57adc1 + lots of fixes to the Z80 internal asm writer
git-svn-id: trunk@45272 -
2020-05-05 22:18:44 +00:00
svenbarth
61358b1eaa * it's rather useless that sectiontype2options is virtual as we can't use a class type, not to mention that the classes doing the overriding are for the internal assemblers/linkers, but we need it also for external
Thus we move the functionality of the overloads to the basemethod and remove the virtual directive; maybe we'll find a better solution in the future...

git-svn-id: trunk@44926 -
2020-04-21 06:05:06 +00:00
svenbarth
5b941e3cea + implement relocations for Aarch64 for the internal COFF linker
git-svn-id: trunk@44913 -
2020-04-21 06:04:15 +00:00
svenbarth
2a1d26cc90 * use translateable error messages for undefined symbols and also report in which object file the symbol was first found
git-svn-id: trunk@43549 -
2019-11-21 21:45:11 +00:00
florian
99ce957111 * fixed default value for progbits
git-svn-id: trunk@43430 -
2019-11-09 18:32:36 +00:00
florian
137f392c66 * parameters declared as out must be initialized
git-svn-id: trunk@43429 -
2019-11-09 18:29:14 +00:00
svenbarth
ccb169b0f1 * correctly handle PE COMDAT sections: like for the Comdat groups in ELF files the unused symbols need to be converted to externals so that relocations are handled correctly
git-svn-id: trunk@43359 -
2019-11-02 12:36:30 +00:00
svenbarth
7f8800eeb1 + add a method to TObjData to retrieve the TSectionProcBits and TSectionFlags values for a given section type
git-svn-id: trunk@43266 -
2019-10-19 15:41:37 +00:00
svenbarth
e5de269664 * change TObjData.sectiontype2options to a class function so that it can be called without an instance of TObjData
git-svn-id: trunk@43265 -
2019-10-19 15:41:33 +00:00
florian
245b58c249 + support for arm attributes
* abi notes fixed

git-svn-id: trunk@43157 -
2019-10-09 17:45:40 +00:00
florian
8ecdb2e9ca + dwarf support for tls threadvars
git-svn-id: trunk@43134 -
2019-10-05 20:48:31 +00:00
florian
16163b74ec + support for the gnu2 general-dynamic tls model on arm, use it instead of the gnu one as the gnu2 one can be relaxed (access optimizations by the linker)
+ support pic relocations in the internal assembler writer

git-svn-id: trunk@43128 -
2019-10-05 20:48:26 +00:00
florian
03dfc615dc + new relocations for arm tls
git-svn-id: trunk@43123 -
2019-10-05 20:48:21 +00:00
florian
56d91b4ca7 + support tls threadvars with the internal assembler
git-svn-id: trunk@43070 -
2019-09-25 21:19:03 +00:00
florian
14b7eaa46f + x86-64: implemented support for relocation needed by tls threadvars in the binary elf writer
git-svn-id: trunk@43067 -
2019-09-25 21:18:59 +00:00
nickysn
3ebcef32ba + introduced TExeSection.MemPosStr - a virtual method for converting the
section's memory position to string for the linker map file. This can be
  overriden e.g. for segmented exe formats.

git-svn-id: trunk@42564 -
2019-08-02 16:05:37 +00:00
Jonas Maebe
3fee990218 * on Mach-O, PECOFF and ELF platforms, write local symbols as hidden/
private_extern (or plain global in case of PECOFF, as the effect is
    the same there): visible across object files, but they become local
    when linked into a binary/library. This enables cross-unit inlining
    of functions accessig implementation-only symbols.

git-svn-id: trunk@42340 -
2019-07-07 21:33:43 +00:00
Jonas Maebe
1b6425176b * synchronised with trunk till r42049
git-svn-id: branches/debug_eh@42050 -
2019-05-12 18:44:05 +00:00
Jonas Maebe
281b3ad276 * fix case completeness and unreachable code warnings in compiler that would
be introduced by the next commit

git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
florian
27ab140dd9 + gcc_except_table section
+ support exception related sections in the default LD linker script

git-svn-id: branches/debug_eh@41285 -
2019-02-10 17:57:48 +00:00
yury
4357caaad8 * Removed unused local vars.
git-svn-id: trunk@40183 -
2018-11-02 18:44:29 +00:00
florian
5782acc32d * patch by J. Gareth Moreton to fix 33909
git-svn-id: trunk@39353 -
2018-07-01 12:54:30 +00:00