Pierre Muller
400094921c
Handle cross-endian case inside TCoffObjData.writereloc method
2024-09-16 18:58:40 +00:00
Sven/Sarah Barth
5bf93d220f
* exact-match COMDAT sections are already supported since tdynamicarray.equal() has been implemented a couple of yours ago, so allow them
2024-06-07 15:34:02 +02:00
Sven/Sarah Barth
c2664fdfa5
* move setup of secrec outside of the if-statement as it's the same for both cases
2024-06-07 15:31:58 +02:00
Sven/Sarah Barth
f5beaa80d8
* the COMDAT record contains the section number which is off-by-one to the section index
2024-06-07 15:31:18 +02:00
Sven/Sarah Barth
52c5a0932d
* allow the COMDAT selection to be 0 in which case we'll simply assume that we don't have a COMDAT section (but we'll nevertheless look up a potentially associative section)
2024-06-07 15:30:53 +02:00
Pierre Muller
7595dd3624
Also swap word/dword in case of cross-endian compilation
2024-01-20 21:35:24 +01:00
Pierre Muller
9648463eb5
Add MaybeSwap for coffsectionrec records (needed for cross-endian compilation)
2024-01-20 21:35:24 +01:00
florian
4867d48e99
+ support for .debug_loc and .debuc_loclist sections
2024-01-16 23:24:37 +01:00
Pierre Muller
ff673eadac
Add unit specifiers for tlsdirectory fields: they need to be PUInt from globtype unit
2023-08-11 08:38:43 +00:00
Pierre Muller
ffdb789a49
Fix syntax errors in make fullcycle
2023-08-11 02:31:43 -05:00
Pierre Muller
ee97c0ca03
Add missing TPECoffExpDir variantr of MaybeSwap procedure
2023-08-10 22:08:26 +00:00
Pierre Muller
2443fd0ad7
Attempt to get ogcoff to work on CPU with opposite endianness
2023-08-10 22:08:26 +00:00
pierre
77e3a402da
Set string length before calling move to avoid problems with global data analysis on systems using C library
...
git-svn-id: trunk@49280 -
2021-04-27 14:52:22 +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
d1cd26592a
* fix for Mantis #37745 : section names where the string offset has more than 7 digits need to be Base64 encoded
...
git-svn-id: trunk@46876 -
2020-09-16 05:16:56 +00:00
svenbarth
fb767dc246
* generate an internal error if the section name should be larger than 8
...
git-svn-id: trunk@46875 -
2020-09-16 05:16:48 +00:00
nickysn
a8fe46c0f5
+ introduced labelmaxlen in tasminfo and added code in ReplaceForbiddenAsmSymbolChars that limits the
...
output label to that length
git-svn-id: branches/z80@45066 -
2020-04-25 12:59:25 +00:00
svenbarth
ada6d8ce5e
* the .pdata section currently only needs to be always included for arm-wince (at least until we have full SEH support there as well)
...
git-svn-id: trunk@44943 -
2020-04-21 06:06:13 +00:00
svenbarth
2b59000d56
+ implement compiler support for SEH on Win64
...
Note: due to the way we access variables in a nested function (which in this case includes exception filters) we can not extract the finally handlers and call them (like we do on i386 and x86_64, but instead we duplicate the finally code)
git-svn-id: trunk@44941 -
2020-04-21 06:06:05 +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
613a6e796a
* Windows on AArch64 requires some DllCharacteristics in the header to be always set
...
git-svn-id: trunk@44919 -
2020-04-21 06:04:41 +00:00
svenbarth
3af74d2fd2
+ implement initial compiler support for Win64 on Aarch64
...
git-svn-id: trunk@44914 -
2020-04-21 06:04:22 +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
3e29742fd9
* for PE+ specific checks use a constant in systems.pas instead of an explicit list (easier to extend this way)
...
git-svn-id: trunk@44912 -
2020-04-21 06:04:10 +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
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
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
99a3855e6b
* restored old default values for MajorOperatingSystemVersion, MajorSubsystemVersion and MinorSubsystemVersion, resolves issue #32492
...
git-svn-id: trunk@37381 -
2017-10-01 21:02:37 +00:00
svenbarth
9619576515
+ add support for $SetPE{OS,SubSys,User}Version directives; Delphi compatible; Note: $SetPEUserVersion takes precedence to $Version
...
+ added test
git-svn-id: trunk@37364 -
2017-09-30 13:55:29 +00:00
svenbarth
e9c40f5b24
+ correctly handle COMDAT sections in COFF files (at least as long as the COMDAT selection isn't IMAGE_COMDAT_SELECT_ASSOCIATIVE or IMAGE_COMDAT_SELECT_EXACT_MATCH), fixes the .refptr problems mentioned in Mantis #30614
...
git-svn-id: trunk@36197 -
2017-05-12 15:57:31 +00:00
florian
b1dff29cbf
* removed unused units
...
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
florian
0897bd154a
+ align(<int64>,<int64>) and align(<qword>,<qword>), resolves an issue reported on the mailing list with large records
...
+ tests
* trecordsymtable.insertunionst takes a asizeint parameter
* changed one aint into a asizeint
git-svn-id: trunk@35662 -
2017-03-26 09:35:56 +00:00
svenbarth
7af52f81a7
* initialize boheader to avoid a warning
...
git-svn-id: trunk@35392 -
2017-02-04 13:57:47 +00:00
svenbarth
669be1e4c2
* don't directly use sym.value as that is not necessarily initialized anymore
...
git-svn-id: trunk@35389 -
2017-02-04 13:49:44 +00:00
florian
23a02c9063
* fix arm compiler building
...
git-svn-id: trunk@35385 -
2017-02-04 13:20:45 +00:00
svenbarth
76445fd4b7
+ add ability to generate Big Obj COFF files if required due to the section count being higher than $7fff
...
Note: such files can be linked GNU ld only starting from 2.25; then again the older versions would fail anyway as they'd complain about a too high section count...
git-svn-id: trunk@35380 -
2017-02-03 22:40:10 +00:00
svenbarth
95bea696ca
+ add ability to read Big Obj COFF files as generated by MSVC with /bigobj and GNU AS with -mbig-obj (starting from version 2.25); this format allows 2^31 sections per COFF file instead of 2^16, thus solving the problem of compiling packages\odata\src\sharepoint.pp
...
Note: the field names of tcoffbigobjheader and coffbigobjsymbol are inspired from the field names of the structs declared in LLVM
git-svn-id: trunk@35379 -
2017-02-03 22:36:58 +00:00
florian
78e945d471
- removed accidently added debug statement
...
git-svn-id: trunk@34907 -
2016-11-16 20:49:58 +00:00
florian
3f072b3e29
* workaround for issue #30348 , FPC allowes now 65535 sections in coff object files, but as the section index is normally signed, this is only a dirty workaround
...
git-svn-id: trunk@34904 -
2016-11-15 22:06:00 +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
Jeppe Johansen
0251263234
Move some of the local reloc calculation out of aasmcpu, and into COFF and ELF writers.
...
git-svn-id: trunk@32867 -
2016-01-06 23:15:08 +00:00
yury
b26fa07f1a
* Fixed notes "var is assigned but not used".
...
git-svn-id: trunk@31734 -
2015-09-17 13:03:04 +00:00
yury
432248cbf1
* Removed lot of unused vars.
...
git-svn-id: trunk@31732 -
2015-09-17 12:48:58 +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
d204aaab72
* refactored "ar" object writer creation in the internal assembler to allow
...
having different implementations of an internal "ar" writer
git-svn-id: trunk@30667 -
2015-04-19 16:35:16 +00:00
Jeppe Johansen
7f34ab27d2
Fixed issue with COFF linker. The addend wasn't shifted up by four before being added.
...
git-svn-id: trunk@30405 -
2015-04-02 22:06:14 +00:00