* 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 -
This commit is contained in:
sergei 2013-08-18 12:01:21 +00:00
parent 9e3d17778d
commit 38058505ba
57 changed files with 224 additions and 248 deletions

View File

@ -46,7 +46,7 @@ interface
DynamicLinker : string[100];
end;
TLinker = class(TAbstractLinker)
TLinker = class(TObject)
public
HasResources,
HasExports : boolean;
@ -132,6 +132,8 @@ interface
procedure AddImportSymbol(const libname,symname,symmangledname:TCmdStr;OrdNr: longint;isvar:boolean);override;
end;
TLinkerClass = class of Tlinker;
var
Linker : TLinker;
@ -139,6 +141,8 @@ interface
function FindLibraryFile(s:TCmdStr;const prefix,ext:TCmdStr;var foundfile : TCmdStr) : boolean;
function FindDLL(const s:TCmdStr;var founddll:TCmdStr):boolean;
procedure RegisterLinker(id:tlink;c:TLinkerClass);
procedure InitLinker;
procedure DoneLinker;
@ -154,8 +158,8 @@ Implementation
aasmbase,aasmtai,aasmdata,aasmcpu,
owbase,owar,ogmap;
type
TLinkerClass = class of Tlinker;
var
CLinker : array[tlink] of TLinkerClass;
{*****************************************************************************
Helpers
@ -1520,21 +1524,23 @@ Implementation
Init/Done
*****************************************************************************}
procedure RegisterLinker(id:tlink;c:TLinkerClass);
begin
CLinker[id]:=c;
end;
procedure InitLinker;
var
lk : TlinkerClass;
begin
if (cs_link_extern in current_settings.globalswitches) and
assigned(target_info.linkextern) then
assigned(CLinker[target_info.linkextern]) then
begin
lk:=TlinkerClass(target_info.linkextern);
linker:=lk.Create;
linker:=CLinker[target_info.linkextern].Create;
end
else
if assigned(target_info.link) then
if assigned(CLinker[target_info.link]) then
begin
lk:=TLinkerClass(target_info.link);
linker:=lk.Create;
linker:=CLinker[target_info.link].Create;
end
else
linker:=Tlinker.Create;

View File

@ -3225,7 +3225,7 @@ begin
{ Force use of external linker if there is no
internal linker or the linking is skipped }
if not(cs_link_extern in init_settings.globalswitches) and
(not assigned(target_info.link) or
((target_info.link=ld_none) or
(cs_link_nolink in init_settings.globalswitches)) then
include(init_settings.globalswitches,cs_link_extern);

View File

@ -197,6 +197,39 @@
,as_jvm_jasmin
);
tlink = (ld_none,
ld_aix, { external linkers (one per OS, handles all CPUs) }
ld_amiga,
ld_android,
ld_beos,
ld_bsd,
ld_embedded,
ld_emx,
ld_gba,
ld_go32v2,
ld_haiku,
ld_jvm,
ld_linux,
ld_morphos,
ld_mpw,
ld_msdos,
ld_nds,
ld_netwlibc,
ld_netware,
ld_os2,
ld_palmos,
ld_solaris,
ld_watcom,
ld_wdosx,
ld_wii,
ld_windows,
ld_int_go32v2, { implemented internal linkers }
ld_int_linux,
ld_int_nativent,
ld_int_netware,
ld_int_windows
);
tar = (ar_none
,ar_gnu_ar
,ar_mpw_ar

View File

@ -33,13 +33,6 @@ interface
*****************************************************************************}
type
{ Abstract linker class which is implemented in link module }
TAbstractLinker = class
end;
TAbstractLinkerClass = class of TAbstractLinker;
TAbstractResourceFile = class
constructor create(const fn : ansistring);virtual;abstract;
end;
@ -187,8 +180,8 @@ interface
dirsep : char;
assem : tasm;
assemextern : tasm; { external assembler, used by -a }
link : tabstractlinkerclass;
linkextern : tabstractlinkerclass; { external linker, used by -s }
link : tlink;
linkextern : tlink; { external linker, used by -s }
ar : tar;
res : tres;
dbg : tdbg;
@ -387,19 +380,6 @@ interface
procedure RegisterTarget(const r:tsysteminfo);
procedure RegisterRes(const r:tresinfo; rcf : TAbstractResourceFileClass);
procedure RegisterAr(const r:tarinfo);
{ Register the external linker. This routine is called to setup the
class to use for the linker. It returns the tsysteminfo structure
updated with the correct linker class for external linking.
}
procedure RegisterExternalLinker(var system_info: tsysteminfo; c:TAbstractLinkerClass);
{ Register the internal linker. This routine is called to setup the
class to use for the linker. It returns the tsysteminfo structure
updated with the correct linker class for internal linking.
If internal linking is not supported, this class can be set
to nil.
}
procedure RegisterInternalLinker(var system_info : tsysteminfo; c:TAbstractLinkerClass);
procedure InitSystems;
@ -662,16 +642,6 @@ begin
arinfos[t]^:=r;
end;
procedure RegisterExternalLinker(var system_info: tsysteminfo; c:TAbstractLinkerClass);
begin
system_info.linkextern := c;
end;
procedure RegisterInternalLinker(var system_info : tsysteminfo; c:TAbstractLinkerClass);
begin
system_info.link := c;
end;
procedure DeregisterInfos;

View File

@ -64,8 +64,8 @@ unit i_aix;
dirsep : '/';
assem : as_powerpc_xcoff;
assemextern : as_powerpc_xcoff;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_aix;
ar : ar_gnu_ar;
res : res_xcoff;
dbg : dbg_stabx;
@ -127,8 +127,8 @@ unit i_aix;
dirsep : '/';
assem : as_powerpc_xcoff;
assemextern : as_powerpc_xcoff;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_aix;
ar : ar_gnu_ar;
res : res_xcoff;
dbg : dbg_stabx;

View File

@ -63,8 +63,8 @@ unit i_amiga;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_amiga;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;
@ -125,8 +125,8 @@ unit i_amiga;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_amiga;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;

View File

@ -65,8 +65,8 @@ unit i_android;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_android;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -130,8 +130,8 @@ unit i_android;
dirsep : '/';
assem : as_i386_elf32;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_android;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;

View File

@ -64,8 +64,8 @@ unit i_beos;
dirsep : '/';
assem : as_i386_elf32;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_beos;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;

View File

@ -93,8 +93,8 @@ unit i_bsd;
dirsep : '/';
assem : as_i386_elf32;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_bsd;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -159,8 +159,8 @@ unit i_bsd;
dirsep : '/';
assem : as_x86_64_elf64;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_bsd;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_dwarf2; //dbg_stabs;
@ -222,8 +222,8 @@ unit i_bsd;
dirsep : '/';
assem : as_i386_elf32;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_bsd;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -284,8 +284,8 @@ unit i_bsd;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_bsd;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -349,8 +349,8 @@ unit i_bsd;
dirsep : '/';
assem : as_x86_64_elf64;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_bsd;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_dwarf2; //dbg_stabs;
@ -411,8 +411,8 @@ unit i_bsd;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_bsd;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -473,8 +473,8 @@ unit i_bsd;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_bsd;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -539,8 +539,8 @@ unit i_bsd;
dirsep : '/';
assem : as_x86_64_elf64;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_bsd;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_dwarf2; //dbg_stabs;
@ -601,8 +601,8 @@ unit i_bsd;
dirsep : '/';
assem : as_darwin;
assemextern : as_darwin;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_bsd;
ar : ar_gnu_ar;
res : res_macho;
dbg : dbg_stabs;
@ -665,8 +665,8 @@ unit i_bsd;
dirsep : '/';
assem : as_darwin;
assemextern : as_darwin;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_bsd;
ar : ar_gnu_ar;
res : res_macho;
dbg : dbg_stabs;
@ -729,8 +729,8 @@ unit i_bsd;
dirsep : '/';
assem : as_darwin;
assemextern : as_darwin;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_bsd;
ar : ar_gnu_ar;
res : res_macho;
dbg : dbg_dwarf2;
@ -793,8 +793,8 @@ unit i_bsd;
dirsep : '/';
assem : as_darwin;
assemextern : as_darwin;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_bsd;
ar : ar_gnu_ar;
res : res_macho;
dbg : dbg_dwarf2;
@ -857,8 +857,8 @@ unit i_bsd;
dirsep : '/';
assem : as_darwin;
assemextern : as_darwin;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_bsd;
ar : ar_gnu_ar;
res : res_macho;
dbg : dbg_dwarf2;
@ -920,8 +920,8 @@ unit i_bsd;
dirsep : '/';
assem : as_darwin;
assemextern : as_darwin;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_bsd;
ar : ar_gnu_ar;
res : res_macho;
dbg : dbg_dwarf2;

View File

@ -63,8 +63,8 @@ unit i_embed;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_embedded;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;
@ -126,8 +126,8 @@ unit i_embed;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_embedded;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_dwarf2;
@ -189,8 +189,8 @@ unit i_embed;
dirsep : '/';
assem : as_i386_elf32;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_embedded;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;

View File

@ -74,8 +74,8 @@ unit i_emx;
dirsep : '\';
assem : as_i386_as_aout;
assemextern : as_i386_as_aout;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_emx;
ar : ar_gnu_ar;
res : res_watcom_wrc_os2;
dbg : dbg_stabs;

View File

@ -64,8 +64,8 @@ unit i_gba;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_gba;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;

View File

@ -63,8 +63,8 @@ unit i_go32v2;
dirsep : '\';
assem : as_i386_coff;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_int_go32v2;
linkextern : ld_go32v2;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;

View File

@ -65,8 +65,8 @@ unit i_haiku;
dirsep : '/';
assem : as_i386_elf32;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_haiku;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;

View File

@ -81,8 +81,8 @@ unit i_jvm;
dirsep : '/';
assem : as_jvm_jasmin;
assemextern : as_jvm_jasmin;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_jvm;
ar : ar_none;
res : res_jvm_raw;
dbg : dbg_jasmin;
@ -146,8 +146,8 @@ unit i_jvm;
dirsep : '/';
assem : as_jvm_jasmin;
assemextern : as_jvm_jasmin;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_jvm;
ar : ar_none;
res : res_jvm_raw;
dbg : dbg_jasmin;

View File

@ -69,8 +69,8 @@ unit i_linux;
dirsep : '/';
assem : as_i386_elf32;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -133,8 +133,8 @@ unit i_linux;
dirsep : '/';
assem : as_i386_elf32;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -197,8 +197,8 @@ unit i_linux;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -261,8 +261,8 @@ unit i_linux;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -324,8 +324,8 @@ unit i_linux;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_dwarf2;
@ -387,8 +387,8 @@ unit i_linux;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -451,8 +451,8 @@ unit i_linux;
dirsep : '/';
assem : as_x86_64_elf64;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_dwarf2;
@ -517,8 +517,8 @@ unit i_linux;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -582,8 +582,8 @@ unit i_linux;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -647,8 +647,8 @@ unit i_linux;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -712,8 +712,8 @@ unit i_linux;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -776,8 +776,8 @@ unit i_linux;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -844,8 +844,8 @@ unit i_linux;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;
@ -909,8 +909,8 @@ unit i_linux;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_linux;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_stabs;

View File

@ -62,8 +62,8 @@ unit i_macos;
dirsep : ':';
assem : as_powerpc_mpw;
assemextern : as_powerpc_mpw;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_mpw;
ar : ar_mpw_ar;
res : res_powerpc_mpw;
dbg : dbg_stabs;

View File

@ -63,8 +63,8 @@ unit i_morph;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_morphos;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;

View File

@ -64,8 +64,8 @@ unit i_msdos;
dirsep : '\';
assem : as_i386_nasmobj;
assemextern : as_i386_nasmobj;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_msdos;
ar : ar_watcom_wlib_omf;
res : res_none;
dbg : dbg_stabs;

View File

@ -68,8 +68,8 @@ unit i_nativent;
dirsep : '\';
assem : as_i386_pecoff;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_int_nativent;
linkextern : ld_none;
ar : ar_gnu_ar;
res : res_gnu_windres;
dbg : dbg_stabs;

View File

@ -64,8 +64,8 @@ unit i_nds;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_nds;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;

View File

@ -63,8 +63,8 @@ unit i_nwl;
dirsep : '/';
assem : as_i386_elf32;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_netwlibc;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;

View File

@ -63,8 +63,8 @@ unit i_nwm;
dirsep : '/';
assem : as_i386_nlmcoff; // as_i386_elf32;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_int_netware;
linkextern : ld_netware;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;

View File

@ -74,8 +74,8 @@ unit i_os2;
dirsep : '\';
assem : as_i386_as_aout;
assemextern : as_i386_as_aout;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_os2;
ar : ar_gnu_ar;
res : res_watcom_wrc_os2;
dbg : dbg_stabs;

View File

@ -63,8 +63,8 @@ unit i_palmos;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_palmos;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;
@ -136,8 +136,8 @@ unit i_palmos;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_palmos;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;

View File

@ -65,8 +65,8 @@ unit i_sunos;
dirsep : '/';
assem : as_i386_elf32;
assemextern : as_ggas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_solaris;
ar : ar_gnu_gar;
res : res_elf;
dbg : dbg_stabs;
@ -132,8 +132,8 @@ unit i_sunos;
dirsep : '/';
assem : as_ggas{as_x86_64_elf64};
assemextern : as_ggas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_solaris;
ar : ar_gnu_ar;
res : res_elf;
dbg : dbg_dwarf2;
@ -199,8 +199,8 @@ unit i_sunos;
dirsep : '/';
assem : as_ggas;
assemextern : as_ggas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_solaris;
ar : ar_gnu_gar;
res : res_elf;
dbg : dbg_stabs;

View File

@ -65,8 +65,8 @@ unit i_symbian;
dirsep : '\';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_windows;
ar : ar_gnu_ar;
res : res_gnu_windres;
dbg : dbg_stabs;
@ -128,8 +128,8 @@ unit i_symbian;
dirsep : '\';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_windows;
linkextern : ld_none;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;

View File

@ -63,8 +63,8 @@ unit i_watcom;
dirsep : '\';
assem : as_i386_wasm;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_watcom;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;

View File

@ -63,8 +63,8 @@ unit i_wdosx;
dirsep : '\';
assem : as_i386_pecoffwdosx;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_wdosx;
ar : ar_gnu_ar;
res : res_gnu_windres;
dbg : dbg_stabs;

View File

@ -63,8 +63,8 @@ unit i_wii;
dirsep : '/';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_none;
linkextern : ld_wii;
ar : ar_gnu_ar;
res : res_none;
dbg : dbg_stabs;

View File

@ -68,8 +68,8 @@ unit i_win;
dirsep : '\';
assem : as_i386_pecoff;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_int_windows;
linkextern : ld_windows;
ar : ar_gnu_ar;
res : res_gnu_windres;
dbg : dbg_stabs;
@ -135,8 +135,8 @@ unit i_win;
dirsep : '\';
assem : as_x86_64_pecoff;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_int_windows;
linkextern : ld_windows;
ar : ar_gnu_ar;
res : res_win64_gorc;
dbg : dbg_dwarf2;
@ -200,8 +200,8 @@ unit i_win;
dirsep : '\';
assem : as_gas;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_int_windows;
linkextern : ld_windows;
ar : ar_gnu_ar_scripted;
res : res_gnu_windres;
dbg : dbg_stabs;
@ -265,8 +265,8 @@ unit i_win;
dirsep : '\';
assem : as_i386_pecoffwince;
assemextern : as_gas;
link : nil;
linkextern : nil;
link : ld_int_windows;
linkextern : ld_windows;
ar : ar_gnu_ar_scripted;
res : res_gnu_windres;
dbg : dbg_stabs;

View File

@ -414,14 +414,13 @@ end;
*****************************************************************************}
initialization
RegisterLinker(ld_aix,TLinkerAIX);
{$ifdef powerpc}
RegisterExternalLinker(system_powerpc_aix_info,TLinkerAIX);
RegisterImport(system_powerpc_aix,timportlibaix);
RegisterExport(system_powerpc_aix,texportlibaix);
RegisterTarget(system_powerpc_aix_info);
{$endif powerpc}
{$ifdef powerpc64}
RegisterExternalLinker(system_powerpc64_aix_info,TLinkerAIX);
RegisterImport(system_powerpc64_aix,timportlibaix);
RegisterExport(system_powerpc64_aix,texportlibaix);
RegisterTarget(system_powerpc64_aix_info);

View File

@ -277,11 +277,11 @@ end;
initialization
{$ifdef m68k}
{ TODO: No executable creation support for m68k yet!}
RegisterExternalLinker(system_m68k_Amiga_info,TLinkerAmiga);
RegisterLinker(ld_amiga,TLinkerAmiga);
RegisterTarget(system_m68k_Amiga_info);
{$endif m68k}
{$ifdef powerpc}
RegisterExternalLinker(system_powerpc_Amiga_info,TLinkerAmiga);
RegisterLinker(ld_amiga,TLinkerAmiga);
RegisterTarget(system_powerpc_Amiga_info);
{$endif powerpc}
end.

View File

@ -424,14 +424,13 @@ end;
*****************************************************************************}
initialization
RegisterLinker(ld_android,TLinkerAndroid);
{$ifdef ARM}
RegisterExternalLinker(system_arm_android_info,TLinkerAndroid);
RegisterImport(system_arm_android,timportlibandroid);
RegisterExport(system_arm_android,texportlibandroid);
RegisterTarget(system_arm_android_info);
{$endif ARM}
{$ifdef I386}
RegisterExternalLinker(system_i386_android_info,TLinkerAndroid);
RegisterImport(system_i386_android,timportlibandroid);
RegisterExport(system_i386_android,texportlibandroid);
RegisterTarget(system_i386_android_info);

View File

@ -491,8 +491,8 @@ end;
*****************************************************************************}
initialization
RegisterLinker(ld_beos,TLinkerbeos);
{$ifdef i386}
RegisterExternalLinker(system_i386_beos_info,TLinkerbeos);
RegisterImport(system_i386_beos,timportlibbeos);
RegisterExport(system_i386_beos,texportlibbeos);
RegisterTarget(system_i386_beos_info);

View File

@ -879,29 +879,23 @@ end;
*****************************************************************************}
initialization
RegisterLinker(ld_bsd,TLinkerBSD);
{$ifdef x86_64}
RegisterExternalLinker(system_x86_64_FreeBSD_info,TLinkerBSD);
RegisterImport(system_x86_64_freebsd,timportlibbsd);
RegisterExport(system_x86_64_freebsd,texportlibbsd);
RegisterTarget(system_x86_64_freebsd_info);
RegisterExternalLinker(system_x86_64_OpenBSD_info,TLinkerBSD);
RegisterImport(system_x86_64_openbsd,timportlibbsd);
RegisterExport(system_x86_64_openbsd,texportlibbsd);
RegisterTarget(system_x86_64_openbsd_info);
RegisterExternalLinker(system_x86_64_NetBSD_info,TLinkerBSD);
RegisterImport(system_x86_64_netbsd,timportlibbsd);
RegisterExport(system_x86_64_netbsd,texportlibbsd);
RegisterTarget(system_x86_64_netbsd_info);
RegisterExternalLinker(system_x86_64_darwin_info,TLinkerBSD);
RegisterImport(system_x86_64_darwin,timportlibdarwin);
RegisterExport(system_x86_64_darwin,texportlibdarwin);
RegisterTarget(system_x86_64_darwin_info);
{$endif}
{$ifdef i386}
RegisterExternalLinker(system_i386_FreeBSD_info,TLinkerBSD);
RegisterExternalLinker(system_i386_NetBSD_info,TLinkerBSD);
RegisterExternalLinker(system_i386_OpenBSD_info,TLinkerBSD);
RegisterImport(system_i386_freebsd,timportlibbsd);
RegisterExport(system_i386_freebsd,texportlibbsd);
RegisterTarget(system_i386_freebsd_info);
@ -911,42 +905,33 @@ initialization
RegisterImport(system_i386_openbsd,timportlibbsd);
RegisterExport(system_i386_openbsd,texportlibbsd);
RegisterTarget(system_i386_openbsd_info);
RegisterExternalLinker(system_i386_darwin_info,TLinkerBSD);
RegisterImport(system_i386_darwin,timportlibdarwin);
RegisterExport(system_i386_darwin,texportlibdarwin);
RegisterTarget(system_i386_darwin_info);
RegisterExternalLinker(system_i386_iphonesim_info,TLinkerBSD);
RegisterImport(system_i386_iphonesim,timportlibdarwin);
RegisterExport(system_i386_iphonesim,texportlibdarwin);
RegisterTarget(system_i386_iphonesim_info);
{$endif i386}
{$ifdef m68k}
// RegisterExternalLinker(system_m68k_FreeBSD_info,TLinkerBSD);
RegisterExternalLinker(system_m68k_NetBSD_info,TLinkerBSD);
RegisterImport(system_m68k_netbsd,timportlibbsd);
RegisterExport(system_m68k_netbsd,texportlibbsd);
RegisterTarget(system_m68k_netbsd_info);
{$endif m68k}
{$ifdef powerpc}
// RegisterExternalLinker(system_m68k_FreeBSD_info,TLinkerBSD);
RegisterExternalLinker(system_powerpc_darwin_info,TLinkerBSD);
RegisterImport(system_powerpc_darwin,timportlibdarwin);
RegisterExport(system_powerpc_darwin,texportlibdarwin);
RegisterTarget(system_powerpc_darwin_info);
RegisterExternalLinker(system_powerpc_netbsd_info,TLinkerBSD);
RegisterImport(system_powerpc_netbsd,timportlibbsd);
RegisterExport(system_powerpc_netbsd,texportlibbsd);
RegisterTarget(system_powerpc_netbsd_info);
{$endif powerpc}
{$ifdef powerpc64}
RegisterExternalLinker(system_powerpc64_darwin_info,TLinkerBSD);
RegisterImport(system_powerpc64_darwin,timportlibdarwin);
RegisterExport(system_powerpc64_darwin,texportlibdarwin);
RegisterTarget(system_powerpc64_darwin_info);
{$endif powerpc64}
{$ifdef arm}
RegisterExternalLinker(system_arm_darwin_info,TLinkerBSD);
RegisterImport(system_arm_darwin,timportlibdarwin);
RegisterExport(system_arm_darwin,texportlibdarwin);
RegisterTarget(system_arm_darwin_info);

View File

@ -1031,17 +1031,17 @@ function TLinkerEmbedded.postprocessexecutable(const fn : string;isdll:boolean):
initialization
{$ifdef arm}
RegisterExternalLinker(system_arm_embedded_info,TlinkerEmbedded);
RegisterLinker(ld_embedded,TLinkerEmbedded);
RegisterTarget(system_arm_embedded_info);
{$endif arm}
{$ifdef avr}
RegisterExternalLinker(system_avr_embedded_info,TlinkerEmbedded);
RegisterLinker(ld_embedded,TLinkerEmbedded);
RegisterTarget(system_avr_embedded_info);
{$endif avr}
{$ifdef i386}
RegisterExternalLinker(system_i386_embedded_info,TlinkerEmbedded);
RegisterLinker(ld_embedded,TLinkerEmbedded);
RegisterTarget(system_i386_embedded_info);
{$endif i386}
end.

View File

@ -542,7 +542,7 @@ end;
*****************************************************************************}
initialization
RegisterExternalLinker(system_i386_emx_info,TLinkerEMX);
RegisterLinker(ld_emx,TLinkerEMX);
RegisterImport(system_i386_emx,TImportLibEMX);
RegisterRes(res_wrc_os2_info,TResourceFile);
RegisterTarget(system_i386_emx_info);

View File

@ -627,6 +627,6 @@ end;
*****************************************************************************}
initialization
RegisterExternalLinker(system_arm_gba_info,TLinkerGba);
RegisterLinker(ld_gba,TLinkerGba);
RegisterTarget(system_arm_gba_info);
end.

View File

@ -511,7 +511,7 @@ end;
*****************************************************************************}
initialization
RegisterExternalLinker(system_i386_go32v2_info,TExternalLinkerGo32v2);
RegisterInternalLinker(system_i386_go32v2_info,TInternalLinkerGo32v2);
RegisterLinker(ld_go32v2,TExternalLinkerGo32v2);
RegisterLinker(ld_int_go32v2,TInternalLinkerGo32v2);
RegisterTarget(system_i386_go32v2_info);
end.

View File

@ -491,8 +491,8 @@ end;
*****************************************************************************}
initialization
RegisterLinker(ld_haiku,TLinkerhaiku);
{$ifdef i386}
RegisterExternalLinker(system_i386_haiku_info,TLinkerhaiku);
RegisterImport(system_i386_haiku,timportlibhaiku);
RegisterExport(system_i386_haiku,texportlibhaiku);
RegisterTarget(system_i386_haiku_info);

View File

@ -94,13 +94,11 @@ end;
*****************************************************************************}
initialization
RegisterExternalLinker(system_jvm_java32_info, tlinkerjvm);
RegisterLinker(ld_jvm, tlinkerjvm);
RegisterImport(system_jvm_java32,timportlibjvm);
RegisterExport(system_jvm_java32,texportlibjvm);
RegisterTarget(system_jvm_java32_info);
RegisterExternalLinker(system_jvm_android32_info, tlinkerjvm);
RegisterImport(system_jvm_android32,timportlibjvm);
RegisterExport(system_jvm_android32,texportlibjvm);
RegisterTarget(system_jvm_android32_info);

View File

@ -1497,67 +1497,58 @@ end;
*****************************************************************************}
initialization
RegisterLinker(ld_linux,TLinkerLinux);
RegisterLinker(ld_int_linux,TInternalLinkerLinux);
{$ifdef i386}
RegisterExternalLinker(system_i386_linux_info,TLinkerLinux);
RegisterImport(system_i386_linux,timportliblinux);
RegisterExport(system_i386_linux,texportliblinux);
RegisterTarget(system_i386_linux_info);
RegisterExternalLinker(system_x86_6432_linux_info,TLinkerLinux);
RegisterImport(system_x86_6432_linux,timportliblinux);
RegisterExport(system_x86_6432_linux,texportliblinux);
RegisterTarget(system_x86_6432_linux_info);
{$endif i386}
{$ifdef m68k}
RegisterExternalLinker(system_m68k_linux_info,TLinkerLinux);
RegisterImport(system_m68k_linux,timportliblinux);
RegisterExport(system_m68k_linux,texportliblinux);
RegisterTarget(system_m68k_linux_info);
{$endif m68k}
{$ifdef powerpc}
RegisterExternalLinker(system_powerpc_linux_info,TLinkerLinux);
RegisterImport(system_powerpc_linux,timportliblinux);
RegisterExport(system_powerpc_linux,texportliblinux);
RegisterTarget(system_powerpc_linux_info);
{$endif powerpc}
{$ifdef powerpc64}
RegisterExternalLinker(system_powerpc64_linux_info,TLinkerLinux);
RegisterImport(system_powerpc64_linux,timportliblinux);
RegisterExport(system_powerpc64_linux,texportliblinux);
RegisterTarget(system_powerpc64_linux_info);
{$endif powerpc64}
{$ifdef alpha}
RegisterExternalLinker(system_alpha_linux_info,TLinkerLinux);
RegisterImport(system_alpha_linux,timportliblinux);
RegisterExport(system_alpha_linux,texportliblinux);
RegisterTarget(system_alpha_linux_info);
{$endif alpha}
{$ifdef x86_64}
RegisterExternalLinker(system_x86_64_linux_info,TLinkerLinux);
RegisterImport(system_x86_64_linux,timportliblinux);
RegisterExport(system_x86_64_linux,texportliblinux);
RegisterTarget(system_x86_64_linux_info);
{$endif x86_64}
{$ifdef SPARC}
RegisterExternalLinker(system_sparc_linux_info,TLinkerLinux);
RegisterImport(system_SPARC_linux,timportliblinux);
RegisterExport(system_SPARC_linux,texportliblinux);
RegisterTarget(system_SPARC_linux_info);
{$endif SPARC}
{$ifdef ARM}
RegisterExternalLinker(system_arm_linux_info,TLinkerLinux);
RegisterImport(system_arm_linux,timportliblinux);
RegisterExport(system_arm_linux,texportliblinux);
RegisterTarget(system_arm_linux_info);
{$endif ARM}
{$ifdef MIPS}
{$ifdef MIPSEL}
RegisterExternalLinker(system_mipsel_linux_info,TLinkerLinux);
RegisterImport(system_mipsel_linux,timportliblinux);
RegisterExport(system_mipsel_linux,texportliblinux);
RegisterTarget(system_mipsel_linux_info);
{$else MIPS}
RegisterExternalLinker(system_mipseb_linux_info,TLinkerLinux);
RegisterImport(system_mipseb_linux,timportliblinux);
RegisterExport(system_mipseb_linux,texportliblinux);
RegisterTarget(system_mipseb_linux_info);

View File

@ -248,7 +248,7 @@ initialization
RegisterImport(system_m68k_macos,timportlibmacos);
{$endif m68k}
{$ifdef powerpc}
RegisterExternalLinker(system_powerpc_macos_info,TLinkerMPW);
RegisterLinker(ld_mpw,TLinkerMPW);
RegisterTarget(system_powerpc_macos_info);
RegisterImport(system_powerpc_macos,timportlibmacos);
{$endif powerpc}

View File

@ -263,6 +263,6 @@ end;
*****************************************************************************}
initialization
RegisterExternalLinker(system_powerpc_morphos_info,TLinkerMorphOS);
RegisterLinker(ld_morphos,TLinkerMorphOS);
RegisterTarget(system_powerpc_morphos_info);
end.

View File

@ -332,11 +332,11 @@ end;
initialization
{$if defined(USE_LINKER_TLINK)}
RegisterExternalLinker(system_i8086_msdos_info,TExternalLinkerMsDosTLink);
RegisterLinker(ld_msdos,TExternalLinkerMsDosTLink);
{$elseif defined(USE_LINKER_ALINK)}
RegisterExternalLinker(system_i8086_msdos_info,TExternalLinkerMsDosALink);
RegisterLinker(ld_msdos,TExternalLinkerMsDosALink);
{$elseif defined(USE_LINKER_WLINK)}
RegisterExternalLinker(system_i8086_msdos_info,TExternalLinkerMsDosWLink);
RegisterLinker(ld_msdos,TExternalLinkerMsDosWLink);
{$else}
{$fatal no linker defined}
{$endif}

View File

@ -85,7 +85,7 @@ implementation
initialization
{$ifdef i386}
{ NativeNT }
RegisterInternalLinker(system_i386_nativent_info,TInternalLinkerNativeNT);
RegisterLinker(ld_int_nativent,TInternalLinkerNativeNT);
RegisterImport(system_i386_nativent,TImportLibNativeNT);
RegisterExport(system_i386_nativent,TExportLibNativeNT);
// RegisterRes(res_gnu_windres_info,TWinLikeResourceFile);

View File

@ -775,6 +775,6 @@ end;
*****************************************************************************}
initialization
RegisterExternalLinker(system_arm_nds_info,TLinkerNDS);
RegisterLinker(ld_nds,TLinkerNDS);
RegisterTarget(system_arm_nds_info);
end.

View File

@ -624,7 +624,7 @@ end;
initialization
RegisterExternalLinker(system_i386_netwlibc_info,TLinkerNetwlibc);
RegisterLinker(ld_netwlibc,TLinkerNetwlibc);
RegisterImport(system_i386_netwlibc,TImportLibNetwlibc);
RegisterExport(system_i386_netwlibc,TExportLibNetwlibc);
RegisterTarget(system_i386_netwlibc_info);

View File

@ -980,8 +980,8 @@ end;
initialization
RegisterExternalLinker(system_i386_netware_info,TLinkerNetware);
RegisterInternalLinker(system_i386_netware_info,TInternalLinkerNetware);
RegisterLinker(ld_netware,TLinkerNetware);
RegisterLinker(ld_int_netware,TInternalLinkerNetware);
RegisterImport(system_i386_netware,TImportLibNetware);
RegisterExport(system_i386_netware,TExportLibNetware);
RegisterTarget(system_i386_netware_info);

View File

@ -557,7 +557,7 @@ end;
*****************************************************************************}
initialization
RegisterExternalLinker(system_i386_os2_info,TLinkerOS2);
RegisterLinker(ld_os2,TLinkerOS2);
RegisterImport(system_i386_os2,TImportLibOS2);
{ RegisterRes(res_wrc_os2_info,TResourceFile);}
RegisterTarget(system_i386_os2_info);

View File

@ -641,22 +641,20 @@ end;
*****************************************************************************}
initialization
RegisterLinker(ld_solaris,TLinkerSolaris);
{$ifdef i386}
RegisterExternalLinker(system_i386_solaris_info,TLinkersolaris);
RegisterImport(system_i386_solaris,TImportLibsolaris);
RegisterExport(system_i386_solaris,TExportLibsolaris);
RegisterTarget(system_i386_solaris_info);
{$endif i386}
{$ifdef x86_64}
RegisterExternalLinker(system_x86_64_solaris_info,TLinkersolaris);
RegisterImport(system_x86_64_solaris,TImportLibsolaris);
RegisterExport(system_x86_64_solaris,TExportLibsolaris);
RegisterTarget(system_x86_64_solaris_info);
{$endif x86_64}
{$ifdef sparc}
RegisterExternalLinker(system_sparc_solaris_info,TLinkersolaris);
RegisterImport(system_sparc_solaris,TImportLibsolaris);
RegisterExport(system_sparc_solaris,TExportLibsolaris);
RegisterTarget(system_sparc_solaris_info);

View File

@ -181,8 +181,11 @@ implementation
*****************************************************************************}
initialization
{ Using external linker as internal doesn't look correct... }
RegisterLinker(ld_windows,TExternalLinkerWin);
RegisterLinker(ld_int_windows,TInternalLinkerWin);
{$ifdef i386}
RegisterInternalLinker(system_i386_symbian_info,TExternalLinkerWin);
///RegisterInternalLinker(system_i386_symbian_info,TExternalLinkerWin);
RegisterImport(system_i386_symbian,TImportLibWin);
RegisterExport(system_i386_symbian,TExportLibWin);
RegisterDLLScanner(system_i386_symbian,TDLLScannerWin);
@ -191,7 +194,7 @@ initialization
{$endif i386}
{$ifdef arm}
// RegisterExternalLinker(system_arm_symbian_info,TExternalLinkerWin);
RegisterInternalLinker(system_arm_symbian_info,TInternalLinkerWin);
///RegisterInternalLinker(system_arm_symbian_info,TInternalLinkerWin);
RegisterImport(system_arm_symbian,TImportLibWin);
RegisterExport(system_arm_symbian,TExportLibWin);
RegisterTarget(system_arm_symbian_info);

View File

@ -174,6 +174,6 @@ end;}
*****************************************************************************}
initialization
RegisterExternalLinker(system_i386_watcom_info,TLinkerWatcom);
RegisterLinker(ld_watcom,TLinkerWatcom);
RegisterTarget(system_i386_watcom_info);
end.

View File

@ -74,7 +74,7 @@ end;
*****************************************************************************}
initialization
RegisterExternalLinker(system_i386_wdosx_info,TExternalLinkerWdosx);
RegisterLinker(ld_wdosx,TExternalLinkerWdosx);
RegisterImport(system_i386_wdosx,TImportLibWdosx);
RegisterExport(system_i386_wdosx,TExportLibWdosx);
RegisterDLLScanner(system_i386_wdosx,TDLLScannerWdosx);

View File

@ -592,6 +592,6 @@ end;
*****************************************************************************}
initialization
RegisterExternalLinker(system_powerpc_wii_info,TLinkerWii);
RegisterLinker(ld_wii,TLinkerWii);
RegisterTarget(system_powerpc_wii_info);
end.

View File

@ -1815,26 +1815,22 @@ implementation
*****************************************************************************}
initialization
RegisterLinker(ld_int_windows,TInternalLinkerWin);
RegisterLinker(ld_windows,TExternalLinkerWin);
{$ifdef i386}
{ Win32 }
RegisterExternalLinker(system_i386_win32_info,TExternalLinkerWin);
RegisterInternalLinker(system_i386_win32_info,TInternalLinkerWin);
RegisterImport(system_i386_win32,TImportLibWin);
RegisterExport(system_i386_win32,TExportLibWin);
RegisterDLLScanner(system_i386_win32,TDLLScannerWin);
RegisterRes(res_gnu_windres_info,TWinLikeResourceFile);
RegisterTarget(system_i386_win32_info);
{ WinCE }
RegisterExternalLinker(system_i386_wince_info,TExternalLinkerWin);
RegisterInternalLinker(system_i386_wince_info,TInternalLinkerWin);
RegisterImport(system_i386_wince,TImportLibWin);
RegisterExport(system_i386_wince,TExportLibWin);
RegisterDLLScanner(system_i386_wince,TDLLScannerWin);
RegisterTarget(system_i386_wince_info);
{$endif i386}
{$ifdef x86_64}
RegisterExternalLinker(system_x64_win64_info,TExternalLinkerWin);
RegisterInternalLinker(system_x64_win64_info,TInternalLinkerWin);
RegisterImport(system_x86_64_win64,TImportLibWin);
RegisterExport(system_x86_64_win64,TExportLibWin);
RegisterDLLScanner(system_x86_64_win64,TDLLScannerWin);
@ -1842,8 +1838,6 @@ initialization
RegisterTarget(system_x64_win64_info);
{$endif x86_64}
{$ifdef arm}
RegisterExternalLinker(system_arm_wince_info,TExternalLinkerWin);
RegisterInternalLinker(system_arm_wince_info,TInternalLinkerWin);
RegisterImport(system_arm_wince,TImportLibWin);
RegisterExport(system_arm_wince,TExportLibWin);
RegisterRes(res_gnu_windres_info,TWinLikeResourceFile);