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
Jeppe Johansen
a3fd3ee3ab
Fixed bug in ARM coff writer. Relocations just ORed the offset onto the instruction instead of adding, but they are emitted as bl 0xFFFFFE, and not bl 0x0.
...
git-svn-id: trunk@30403 -
2015-04-02 18:28:42 +00:00
Jeppe Johansen
9e5979e8be
Implemented UAL syntax support in the ARM assembler reader. Can be toggled with a field for now, but not implemented yet. Still using pre-UAL syntax for now.
...
Switched codegeneration of VFPv2 and VFPv3 to use UAL mnemonics and syntax.
Updated VFP code in RTL to use UAL syntax too.
Added preliminary ELF support for ARM.
Added support for linking of WinCE COFF files. Should work for with a standard ARMv4-I target.
git-svn-id: branches/laksen/armiw@29247 -
2014-12-10 20:44:34 +00:00
sergei
8c61990078
* ogcoff.pas: when encountering symbol of unsupported type in input object file, give a meaningful error message instead of internal error. Mantis #27020 .
...
- removed repeating check of section index.
git-svn-id: trunk@29062 -
2014-11-11 21:29:10 +00:00
nickysn
7cfd7a66cd
+ create a special 'heap' segment with reserved space equal to heapsize (i.e.
...
the value set by -Ch or the second parameter to the $M directive). This is
equivalent to the heapmin value in Turbo Pascal 7 and ensures that the program
has at least this amount of heap space available (otherwise DOS will show a
'not enough memory' error and will refuse to load the program).
git-svn-id: trunk@28002 -
2014-06-19 14:14:01 +00:00
nickysn
3cc8ff11e3
+ generate the stack segment for i8086 far data memory models from within fpc
...
itself (instead of having a fixed 16k stack in the startup code). This allows
setting the stack size in these models with the -Cs option.
git-svn-id: trunk@27820 -
2014-05-27 23:29:50 +00:00
sergei
db621780d5
* x86_64-win64: fixed handling of RELOC_RELATIVE_1..RELOC_RELATIVE_5 COFF relocations, they were off by 4 bytes, causing failure in tests/test/tcalext.pp.
...
git-svn-id: trunk@27430 -
2014-04-01 16:26:56 +00:00
florian
4d5119bf1c
* fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables
...
git-svn-id: trunk@26161 -
2013-12-01 17:02:08 +00:00
sergei
1fea5a82c1
* Replaced oso_disabled flag by TExeSection.Disabled boolean property. Makes code a bit nicer to read.
...
git-svn-id: trunk@24361 -
2013-04-28 20:29:49 +00:00
sergei
9dc5b07a68
* COFF: fixed setting section flags. Content type and access bits must be set for non-loadable sections as well.
...
* Changed .reloc sections to be non-loadable, all Windows DLLs have it that way (and ld produces the same as well).
git-svn-id: trunk@24262 -
2013-04-17 19:51:38 +00:00
sergei
b86372ccec
+ Internal linker: process unreferenced .pdata sections on x86_64-win64, restores the possibility to use GAS on win64 (which got broken by introducing SEH).
...
git-svn-id: trunk@24235 -
2013-04-13 18:52:50 +00:00
sergei
999c3a0a02
* COFF linker: postpone import section generation until unreferenced sections (and imports) are removed, and put all remaining imports into a single section. This is much more efficient than generating multiple smart-linkable import sections and immediately discarding a good half of them.
...
git-svn-id: trunk@24123 -
2013-04-02 05:46:32 +00:00
sergei
d762ef9e78
+ PECOFF targets: support more than 65535 relocations per object section, resolves #23752 . DJCOFF targets: give a fatal error, since this object file format does not support extended relocations.
...
git-svn-id: trunk@23521 -
2013-01-26 16:15:59 +00:00