florian
708aaa7b97
* fix (hopefully) build without an ld.bfd variant
2023-03-02 22:56:23 +01:00
florian
d06852e6e9
+ exec_e_cant_call_linker shows now the error message
2023-02-11 21:07:01 +01:00
Jonas Maebe
e62cf5b9e7
systems_iphonesym -> systems_iphonesim
...
It's a simulator, not a symbolator
2022-10-30 21:57:18 +01: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
Jonas Maebe
1148caaece
llvm: move asan library linking support to texternallinker
...
This way other platforms besides Darwin can also use it.
2022-07-24 14:34:47 +02:00
Yuriy Sydorov
59fca3a01d
* Increased the bounds of TBooleanArray to prevent a range check error while linking Lazarus.
2021-12-12 15:50:12 +02:00
florian
e657aa6431
+ write code and data size for Mach-O files if possible
2021-10-31 11:57:32 +01:00
florian
a4672fbd1c
o based on a patch by Rika, resolves #39401 :
...
* use Base64 (62=_, 63=$) encoded FNV hash (instead of CR-32) to shorted identifiers
* renamed fpccrc to fpchash
+ test
2021-10-10 10:09:22 +02:00
Jonas Maebe
7a0c6ab591
- removed unused leftovers from old t_bsd code
...
* no longer execute the linker via a shell script, but directly
git-svn-id: trunk@49046 -
2021-03-24 14:33:13 +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
ff87df7581
+ factor out PostProcessELFExecutable
...
+ write executable section size on linux
git-svn-id: trunk@47622 -
2020-11-28 16:02:50 +00:00
pierre
152208c0be
In FindObjectFile check the assembly file if cs_assemble_on_target is in globlaswitches
...
git-svn-id: trunk@47489 -
2020-11-20 15:14:14 +00:00
yury
580e9e5169
* wlib: calculate the record size according to the number of files in the library.
...
git-svn-id: trunk@46483 -
2020-08-18 20:02:19 +00:00
yury
324deca817
* wlib: Explicitly specify the smallest possible record align to reduce the size of .a files.
...
git-svn-id: trunk@46462 -
2020-08-16 17:08:00 +00:00
nickysn
a0e2cd3638
* use qword instead of aword for bsssize to avoid 8-bit truncation on Z80
...
git-svn-id: trunk@45621 -
2020-06-07 23:07:39 +00:00
svenbarth
e2d8f7b68f
* allow executable/library name to be changed for an intermediate file
...
git-svn-id: trunk@45599 -
2020-06-06 17:16:35 +00:00
nickysn
fdbf1f4b7f
+ supported scripted sdcc-sdar
...
git-svn-id: branches/z80@45073 -
2020-04-25 15:39:46 +00:00
nickysn
8bd38e0e29
+ added new ar - sdcc-sdar
...
git-svn-id: branches/z80@45072 -
2020-04-25 15:28:35 +00:00
florian
8e929b2879
* make TLinkerInfo fields ansistrings as xtensa-freertos needs long command lines
...
git-svn-id: trunk@44440 -
2020-03-30 20:42:56 +00:00
Jonas Maebe
10b15628ab
* split i/t_darwin from i/t_bsd, as they don't have that much in common
...
any more
git-svn-id: trunk@44407 -
2020-03-29 18:27:27 +00:00
yury
1b3a3a7983
* Removed lot of unused local vars. It is useful to turn on the notes in options. :)
...
git-svn-id: trunk@44053 -
2020-01-28 18:45:33 +00:00
florian
45c4e81b62
* use a process unique name for link.res, so multiple FPCs can be run in parallel in one directory
...
git-svn-id: trunk@42645 -
2019-08-11 15:58:36 +00:00
Jonas Maebe
faf75095cd
* synchronised with trunk till r42189
...
git-svn-id: branches/debug_eh@42190 -
2019-06-07 18:24:38 +00:00
nickysn
40e6c06f67
* fixes to the compiler util exe search routines, which caused the compiler to
...
erroneusly find '/usr/bin/ld' instead of '/usr/bin/ld.bfd' on OpenBSD, which
silently produced broken executables, which made this bug even more "fun" to
find. :)
git-svn-id: trunk@42128 -
2019-05-26 16:57:08 +00:00
Jonas Maebe
46efaf4b2c
+ support for -CLflto_nosystem option to perform LTO for everything except
...
for the system unit, as there are several bugs in the Xcode linkers
that trigger when the system unit is involved:
o Xcode 9.3: the second symbol associated with routines that have multiple
symbols (such as FPC_INTERLOCKED*) gets moved to the next routine (so
e.g. calling InterlockedIncrement results in calling InterlockedExchange)
o Xcode 10.1: the linker does not generate native code for the personality
routine (probably because it's not referenced directly anywhere)
git-svn-id: branches/debug_eh@41911 -
2019-04-20 18:56:15 +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
Jonas Maebe
d150869dea
* record symbols that need to remain in their original order, and on Darwin
...
pass them to the linker so it does not reorder them
o fixes resource strings on Darwin when using LTO (this used to reorder the
resource string symbols, so they no longer all appeared between the START
and END symbols for their compilation module)
git-svn-id: trunk@41907 -
2019-04-20 18:18:10 +00:00
Jonas Maebe
0b61b5d4cf
* added extra header to ppu inside a subsection, so we won't run into
...
trouble when the ppu version hits 255
* also moved several ppu flags to a set inside that section
git-svn-id: trunk@41846 -
2019-04-06 21:28:43 +00:00
Károly Balogh
7e630686e0
* do not use a wildcard while deleting smartlinked objects after linking stage in a script, conflicts with script filename quoting on Unix at least
...
git-svn-id: trunk@37918 -
2018-01-06 10:19:21 +00:00
Károly Balogh
4b113579a5
some tabs to spaces indentation cleanup. no functional change
...
git-svn-id: trunk@37599 -
2017-11-17 11:31:49 +00:00
Károly Balogh
e6aed467b5
renamed script unit to cscript to avoid namespace conflict with univint package on Darwin. this makes it possible to build the textmode IDE on Darwin
...
git-svn-id: trunk@37598 -
2017-11-17 11:27:19 +00:00
florian
b1dff29cbf
* removed unused units
...
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
Jonas Maebe
7a8079cfb4
* removed DLLsource global variable and replaced its uses with
...
current_module.islibrary
git-svn-id: trunk@32676 -
2015-12-17 15:23:05 +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
nickysn
d4a4b9a57b
* refactored the internal linker ar object reader object creation to allow using
...
different 'ar' implementations under different platforms
* use the omflib reader instead of the ar reader in the msdos internal linker
git-svn-id: trunk@31322 -
2015-08-14 13:52:45 +00:00
nickysn
8206c6dbd0
* the code for determining the code, data and bss sizes in the internal linker
...
moved to virtual methods, to allow for platform specific overrides (e.g. for
supporting section names, other than '.text', '.data' and '.bss', etc.)
git-svn-id: trunk@31321 -
2015-08-13 15:07:24 +00:00
nickysn
85cb180d80
* prepend "+" to each file name to be added to the library by wlib. This
...
indicates an "add" command, instead of "replace".
git-svn-id: trunk@30287 -
2015-03-23 01:19:19 +00:00
nickysn
931f5a0b54
* fixed passing of the wlib output file parameter (-o requires an equal sign)
...
git-svn-id: trunk@30286 -
2015-03-23 01:10:32 +00:00
nickysn
069fa51445
* use separate input and output files when invoking wlib to create a static
...
library. This resolves a problem with parallel building of a i8086 cross
compiler, due to a race condition in wlib, when running several instances of
wlib in the same directory. The problem is in the way wlib creates a temp file
in the current directory using non-atomic operations and with a high
probability of a name collision. Using separate input and output files avoids
this temp file creation by wlib.
git-svn-id: trunk@30277 -
2015-03-22 17:42:19 +00:00
Károly Balogh
c421f4d91e
do not include outputexedir in linker resname. it causes the path to be double-included when cross-compiling with -st and -FE on Liunuxes. also, be consistent between linking on host and target.
...
git-svn-id: trunk@29753 -
2015-02-18 14:09:15 +00:00
nickysn
eddab86312
* pass the -b option to wlib to avoid creating .bak files
...
git-svn-id: trunk@27270 -
2014-03-24 17:35:11 +00:00
pierre
754790f641
Use new static library not supproted message
...
git-svn-id: trunk@26598 -
2014-01-27 22:29:07 +00:00
pierre
bef22b2a6f
Add scripted version of wlib call for msdos
...
git-svn-id: trunk@26442 -
2014-01-12 22:47:27 +00:00
sergei
38058505ba
* Changed linking infrastructure to look like assembler one:
...
* Changed direct references to linker classes in TSystemInfo records to enumerated ids.
* RegisterExtennalLinker and RegisterInternalLinker procedures replaced by single RegisterLinker procedure and moved to link.pas.
- TAbstractLinker is no longer necessary, removed.
This change allows to register linker once per id, rather than once per target, and also allows TSystemInfo records to be read-only.
git-svn-id: trunk@25279 -
2013-08-18 12:01:21 +00:00
sergei
eec8129738
* TInternalLinker.Load_ReadStaticLibrary: exit if error has occurred while opening a static library or dynamic object, continuing can cause other errors/crashes in this case.
...
* t_linux.pas: use sysrootpath when specifying dynamic interpreter (for cross-linking).
git-svn-id: trunk@25277 -
2013-08-18 09:14:16 +00:00
Károly Balogh
a11c113429
reverted the link object search change
...
git-svn-id: trunk@24727 -
2013-06-01 15:35:59 +00:00
Károly Balogh
e7094cf1d6
fix redundant searches in FindObjectFile, if the object was found on the first try
...
git-svn-id: trunk@24725 -
2013-06-01 15:21:57 +00:00
nickysn
a1ee8ab9bc
* suppress annoying wlib header
...
git-svn-id: branches/i8086@23967 -
2013-03-23 00:08:52 +00:00
nickysn
ac64663e70
+ openwatcom wlib support added
...
git-svn-id: branches/i8086@23964 -
2013-03-22 23:44:33 +00:00
sergei
a1503b51f2
+ chmod 755 on executable files produced by internal linker. I missed this "small" detail for half a year because all development was going on a NTFS drive where everything is executable.
...
git-svn-id: trunk@23374 -
2013-01-13 17:18:11 +00:00