Commit Graph

27 Commits

Author SHA1 Message Date
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
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
florian
8ecdb2e9ca + dwarf support for tls threadvars
git-svn-id: trunk@43134 -
2019-10-05 20:48:31 +00:00
florian
988dce14c7 * cosmetics
git-svn-id: trunk@43125 -
2019-10-05 20:48:23 +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
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
Károly Balogh
2f7fe0e737 haiku-x86_64: add target to the compiler and ppudump, enable it in fpmake and fpcmake
git-svn-id: trunk@40753 -
2019-01-04 02:16:24 +00:00
yury
e367577bf1 + added support for x86_64-android target.
git-svn-id: trunk@39956 -
2018-10-17 16:56:27 +00:00
Károly Balogh
7ca62febcd AROS/x86_64: initial AROS/x86_64 support and implement syscalls for AROS/x86_64
git-svn-id: trunk@31169 -
2015-06-28 19:16:40 +00:00
Jeppe Johansen
47dbec3111 Rebase to trunk revision
git-svn-id: branches/laksen/armiw@29708 -
2015-02-15 16:08:18 +00:00
pierre
c7e939b243 Add x86_64-solaris to the list of supported targetss for as_x86_64_elf64 binary writer
git-svn-id: trunk@29574 -
2015-01-28 22:52:01 +00:00
Jeppe Johansen
901275b4a1 Switch back to emitting BLX instructions and fix calculation of constant offsets(should rarely/never happen).
Add missing fields to other elf targets.

git-svn-id: branches/laksen/armiw@29286 -
2014-12-14 16:28:35 +00:00
marco
2578514853 * first dragonfly patch (existing most). Mantis #27091
git-svn-id: trunk@29213 -
2014-12-07 20:27:02 +00:00
sergei
11b72b5515 x86_64 internal ELF linker:
* Split generation of regular and TLSIE GOT entries. Although code for both is similar to some extent, mixing them in a single method turns it into spaghetti.
* Several fixes to content and dynamic relocations of TLSIE entries.

git-svn-id: trunk@25180 -
2013-07-29 08:34:00 +00:00
sergei
40c510403f * Don't crash on a PLT-generating relocation to a local symbol (which should not normally appear, but nevertheless is possible).
git-svn-id: trunk@23481 -
2013-01-21 16:49:10 +00:00
sergei
af4935e346 + Support dynamic copy relocations.
* For unresolved weak symbols, provide dynamic binding only if they are referenced via GOT or PLT (ld-compatible behavior).
* Made more TElfExeOutput properties/methods usable by descendant classes.
* x86_64/cpuelf.pas: some refactoring, handle DTPOFF relocations, prohibit TPOFF relocations in shared objects.
* i386/cpuelf.pas: set symref_from_text flags for copy relocations to work correctly.

git-svn-id: trunk@23375 -
2013-01-13 17:44:14 +00:00
sergei
0aa7204707 + Added codes of dynamic relocations to TElfTarget; since most targets use similar dynamic relocation model differing only in code values, this will allow to do majority of handling in the base class.
git-svn-id: trunk@23154 -
2012-12-16 09:36:34 +00:00
sergei
a771d68685 * Fixed a bug introduced in r23077: relative_reloc_count must be increased only once per GOT entry, not every time a relocation to that entry is seen.
git-svn-id: trunk@23126 -
2012-12-09 06:39:43 +00:00
sergei
c4d8396158 * Function RelocName made a member of TElfTarget, so it can be used outside of TElfExeOutput class.
* Methods ReportNonDSOReloc and ReportRelocOverflow moved to TElfExeOutput, they are applicable to all target-specific descendants.

git-svn-id: trunk@23094 -
2012-12-02 13:05:53 +00:00
sergei
d79761c607 * Changed TElfTarget from class to record, so it can contain data members while remaining statically allocated.
* Moved target-dependent constants into ElfTarget records, eliminates a lot of $ifdef's in ogelf.pas.
+ Added TElfTarget.loadsection hook and pass unknown sections to it.

git-svn-id: trunk@23090 -
2012-12-02 11:15:35 +00:00
sergei
a730830c19 * Factored code for allocating GOT slots into TElfExeOutput.AllocGOTSlot.
* Changed signature of GOTRelocPass1 to pass relocation index instead of relocation itself, because sometimes (e.g. when doing TLS relaxation) we need to process several subsequent relocations at once.

git-svn-id: trunk@23077 -
2012-11-29 06:37:28 +00:00
sergei
8ff1d76239 + x86_64/cpuelf.pas: Support writing RELATIVE relocations separately from other ones.
+ i386/cpuelf.pas: Support R_386_TLS_IE and R_386_TLS_LE relocations.

git-svn-id: trunk@22961 -
2012-11-09 14:22:37 +00:00
sergei
4f201bb826 + Handle R_X86_64_PLTOFF64 relocation (same as R_X86_64_GOTOFF64 but requests creation of PLT entry).
git-svn-id: trunk@22846 -
2012-10-25 16:24:29 +00:00
sergei
90d564e6a5 + ELF linker: handle R_386_GOTOFF and R_X86_64_GOTOFF64 relocations
git-svn-id: trunk@22830 -
2012-10-23 14:13:31 +00:00
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.
x86_64 is the most elaborated, has some degree of indirect function (GNU_IFUNC) and TLS support, so it is even able to link with static libc/pthreads code (tw14265) and produce an executable that can launch (but still fails due to invalid DWARF unwind info).

i386 produces working shared libraries if they are compiled with -Cg, without one your mileage may vary. tw14265 does not link yet due to missing COMDAT group support.

git-svn-id: trunk@22775 -
2012-10-19 17:21:08 +00:00
sergei
c529356693 * Split most CPU-specific code from ogelf.pas into newly created cpuelf.pas units in CPU subdirectories.
git-svn-id: trunk@22208 -
2012-08-23 11:49:49 +00:00