Commit Graph

231 Commits

Author SHA1 Message Date
Pierre Muller
7c64bce04e Set defdynlinker depending on selected ABI for riscv32 and riscv64 2023-05-11 16:21:05 +00:00
Pierre Muller
4750840e89 Specify endianess and abi when calling xtensa linker 2023-05-11 01:02:04 +00:00
florian
708aaa7b97 * fix (hopefully) build without an ld.bfd variant 2023-03-02 22:56:23 +01:00
florian
40f23030dc * check if a linker with the postfix .bfd exists, if yes, use it, resolves #40175 2023-03-01 23:01:19 +01:00
Jinyang He
3d2c96ebbf Add loongarch64 linux support to compiler 2023-02-05 19:18:48 +00:00
Jonas Maebe
6d3e3d06e2 Linux: don't discard CFI when using it for exceptions 2022-10-30 21:57:19 +01:00
florian
3fa77a4f62 * fix life information propagation for while loops, resolves #39971
* warnings/errors fixed which are caused by the new life information propagation
  + test
2022-10-24 22:13:43 +02:00
Pierre Muller
aca84a8128 Add /usr/lib64 and /lib64 to default library path list for sparc linux 2022-09-18 14:02:40 +02:00
Jonas Maebe
425707e936 Fix compilation with -Oodfa 2022-07-24 14:46:11 +02:00
Jonas Maebe
7ef33cf4b2 llvm: generalised sanitizer linking support
Also enabled automatic detection of sanitizer library + setting rpath to Linux
2022-07-24 14:36:23 +02:00
florian
2da28054d4 * RiscV: pass the same default directories to the linker as on other architectures 2022-07-21 23:19:08 +02:00
Joost van der Sluis
3385ce92a2 * Always generate CFI-information. During linking it can be omitted when
no debug-information is requested. On Linux this needed a change in the
   linker-script. On Windows it already works as desired. Other targets
   may need some adjustments as well.
2022-07-10 12:24:18 +02:00
florian
28964711d7 * sorted defines in the compiler: mips64 is defined on all 64 Bit mips platforms, mips64el for little endian, misp64eb for big endian 2022-02-06 21:57:01 +01:00
florian
bd82ad0d41 * register MIPS64 targets properly 2022-02-06 10:50:57 +01:00
Pierre Muller
222a41be7b Change declaration of DynLinkStr local variable of MakeExecutable method to ansitring to avoid short string overflows 2021-11-28 23:57:09 +00:00
florian
0a99028128 * newer linux distros might have powerpc64 libraries in /usr/lib or /lib
git-svn-id: trunk@49182 -
2021-04-11 17:30:22 +00:00
florian
1e5cbfe546 * RiscV: if shared libraries are involved, we have to link always against the crt*S.o variants
git-svn-id: trunk@48946 -
2021-03-12 21:59:18 +00:00
florian
7da0284bfc + read 64-Bit ELF executable info correctly
git-svn-id: trunk@47695 -
2020-12-06 10:23:18 +00:00
florian
792b629aa6 + -Xa option: generate code which allows to use more than 2 GB of static data on 64 Bit targets
+ implemented support for x86-64
  * more than 2 GB static data requires to use the --no-relax option on linux

git-svn-id: trunk@47651 -
2020-11-30 22:07:34 +00:00
florian
ff87df7581 + factor out PostProcessELFExecutable
+ write executable section size on linux

git-svn-id: trunk@47622 -
2020-11-28 16:02:50 +00:00
pierre
bcd52d66ee Use default linker script and only add FPC specific sections for Linux OS
git-svn-id: trunk@47374 -
2020-11-10 17:21:00 +00:00
florian
7107c39440 * search also /usr/lib64 for libraries etc. on aarch64-linux, apparently some distros use it
git-svn-id: trunk@46913 -
2020-09-21 17:57:19 +00:00
pierre
ca5e2ee16a Also add platformopt to DllCmd[1], as done for ExeCmd[1]
git-svn-id: trunk@46501 -
2020-08-20 05:20:26 +00:00
florian
9d7261a60b * make eabihf/eabi changeable at compilation time
git-svn-id: trunk@44706 -
2020-04-12 18:05:49 +00:00
florian
e8fabb752a + basic xtensa-linux support in the compiler
git-svn-id: trunk@44611 -
2020-04-05 21:12:12 +00:00
svenbarth
9c088bda6a * fix for Mantis #36706: only link a library against the dynamic loader if we're not linking against the C library anyway
Note: I did not yet find a case where we *do* need to link a library against the loader; this will have to be investigated further, but for 3.2.0 this is safest

git-svn-id: trunk@44256 -
2020-03-02 22:04:36 +00:00
pierre
346118187b Fix linking error, in which libc.so.6 is not found on aarch64-linux when libdl.so is loaded, by adding appropriate directory
git-svn-id: trunk@44215 -
2020-02-19 15:33:11 +00:00
svenbarth
4ad7d552a1 * increase support for multilib binutils for RISC V by passing the correct ABI to the linker
git-svn-id: trunk@43789 -
2019-12-25 15:23:25 +00:00
florian
266daa62f1 * updated arm linker script as proposed by Alfred, resolves #36395
git-svn-id: trunk@43651 -
2019-12-05 20:07:16 +00:00
florian
bdd36d20ac * patch by Alfred: remove superfluous linker script entry, resolves #36345
git-svn-id: trunk@43570 -
2019-11-24 12:16:29 +00:00
florian
f20e6ff323 * update generic linker script
git-svn-id: trunk@43426 -
2019-11-09 16:58:58 +00:00
Jonas Maebe
6483b3f5e3 * fixed opt-in sysroot substitution again, renamed the three-argument version
TSearchPathList.AddPath() to AddLibraryPath() to make it clear it's only
    to be used for adding library search paths (and replaced one case where
    it was used for a source file search path with a call to the
    two-argument version)
  * also added some missing '=' prefixes to built-in library search paths,
    and fixed wrong DirectoryExists checks in t_linux in case of using
    a sysroot, cross-compiling or linking on target

git-svn-id: trunk@43312 -
2019-10-26 13:48:30 +00:00
Jonas Maebe
78fb35525f * change convention for searching sysroot library paths to be the same as the
one used by GNU ld: only search for library paths in the sysroot if they
    are built into the compiler or start with "=". Previously, all
    user-provided library paths were also searched in the sysroot
    (mantis #36198)

git-svn-id: trunk@43279 -
2019-10-20 17:26:44 +00:00
pierre
9d765af693 Fix parsing error in GNU linker script, KEEP needs braces
git-svn-id: trunk@43197 -
2019-10-14 16:04:02 +00:00
florian
f6667a5143 * we have to use __tls_get_addr from the dyn. linker lib else tls on programs with pure pascal dyn. libraries fail
git-svn-id: trunk@43069 -
2019-09-25 21:19:01 +00:00
florian
26acc8fb2a * make stack non executable on arm-linux
git-svn-id: trunk@42539 -
2019-07-30 21:04:31 +00:00
florian
b71164deca * fix warnings
git-svn-id: branches/debug_eh@42256 -
2019-06-20 17:13:59 +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
svenbarth
0bd1687398 * fix for Mantis #35326 (applied patch by Cyrax): objcopy's --add-gnu-debuglink parameter doesn't handle quoted paths correctly, so quote the whole path
git-svn-id: trunk@42025 -
2019-05-10 12:59:26 +00:00
Jonas Maebe
fc60ec2ea4 + support for LLVM LTO: compile units with -CLflto -> when compiling a main
program/library also with -Clflto, all units compiled with that option
    will be linked using their bitcode files and LTO
   o compiling with -CLflto will compile all units twice: once for normal
     (static or smart) linking, and once for LTO. So the result can be
     used both with and without LTO.

git-svn-id: branches/debug_eh@41910 -
2019-04-20 18:56:11 +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
Jonas Maebe
b3a8543a56 * synchronised with trunk till r40942
git-svn-id: branches/debug_eh@40943 -
2019-01-20 17:37:07 +00:00
pierre
bbede67175 Also add /usr/lib/CPU-linux-gnu to link directory list for mips and mipsel
git-svn-id: trunk@40905 -
2019-01-19 16:06:04 +00:00
Jonas Maebe
37ae70f925 * pass --eh-frame-hdr to the linker on Linux when using Dwarf-based EH, as
libgcc's unwinder does not work without it

git-svn-id: branches/debug_eh@40435 -
2018-12-01 20:30:37 +00:00
Jeppe Johansen
90d5f5e760 Added library search paths.
Removed GP and TP from allocatable registers for now. GP should not be overwritten.
Ported dllprt0.as
Fixed register usage in cprt0.as

git-svn-id: branches/laksen/riscv_new@39522 -
2018-07-29 13:08:15 +00:00
Jeppe Johansen
76dda5813e Updated dynlinker filename.
Fix passing of vararg register pairs.
Fix passing of big record, and return of records.
Disabled framepointer elimination for the time being.

git-svn-id: branches/laksen/riscv_new@39519 -
2018-07-28 20:06:06 +00:00
Jeppe Johansen
ceb38833f2 Added RiscV32/64 target, from a cleaned up version of branches/laksen/riscv/trunk.
git-svn-id: branches/laksen/riscv_new@39474 -
2018-07-20 08:21:15 +00:00
michael
f6867cbd63 * Patch by Cyrax to allow creating map file on linux (bug ID 33982)
git-svn-id: trunk@39449 -
2018-07-14 08:12:38 +00:00
pierre
6cab9fd7db Add replacement of $GCSECTIONS for shared libraries
git-svn-id: trunk@39403 -
2018-07-07 07:22:51 +00:00
marco
2a80eb3fdd * patch from #31920, pass gc-sections to .so's
git-svn-id: trunk@39392 -
2018-07-06 08:17:10 +00:00