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 -
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 -
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 -
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 -
* 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 -
* Dropped TObjInput.newObjData method. Instead, TObjData instances are created directly in ReadObjData, this gives possibility to create a different type of TObjData based on file header.
- Dropped TObjInput destructor, it does nothing except calling inherited.
git-svn-id: trunk@23118 -
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 -
+ Support linker input source grouping functionality.
* Promote TStaticLibrary to something like generic linker input statement, it can now hold regular ObjData or a group of other TStaticLibrary objects in addition to tarobjectreader.
git-svn-id: trunk@22155 -
+ Two stubs (TExeOutput.Load_DynamicObject and TObjInput.CanReadObjData) to override in ELF linker.
+ Stop linking if errors were detected while loading object files.
* Changed TStaticLibrary to TObject. It is never looked up by name, so hashing is redundant; moreover its name has been changed to TCmdStr, which may be trimmed by TFPHashList.
git-svn-id: trunk@21968 -
that deal with paths/filenames with TPathStr (= ansistring) to prevent
cutting off long paths (no change in speed when compiling the compiler,
1% extra memory usage)
git-svn-id: trunk@21120 -
based on the actual target platform rather than always on the host
platform
* on Unix, use single rather than double quotes for quoting, so it also
properly handles $, ! and `, which keep their special meaning when
appearing in scripts inside double quotes
* since sysutils.executeprocess() can only deal with double-quoted
strings in parameters, re-quote parameters on Unix when they turn
out not to be for scripts but for direct execution (which is most
of the time, but unfortunately doing the reverse is not possible
because parameters used in scripts sometimes contain script-specific
code that must not be quoted, such as `cat link.res`)
-> always use cfileutl.RequotedExecuteProcess() rather than
sysutils.ExecuteProcess() in the compiler (added a bunch of dummy
ExecuteProcess string constants to common units to prevent accidental
usage)
git-svn-id: branches/jvmbackend@20901 -
in Windows, Emx and OS2 targets.
This fixes test failures: test/library/tlib1b.pp and lib2b.pp
link unit TLinker.AddImportSymbol: Added symmangledname parameter.
ogbase unit TImportSymbol.Create: Add AMangledName parameter.
fmodule unit TModule.AddExternalImport: Add symmangledname parameter.
fppu unit: Also put mangled name string for imported symbol.
ppu unit: Increase PPUVersion
utils/ppudump.pp: Adapt to PPU change above.
systems/T_OS units: Use ImportSymbol.MangledName property to create
import libraries or .idata sections.
git-svn-id: trunk@17804 -