* fix dll linking

git-svn-id: trunk@2464 -
This commit is contained in:
peter 2006-02-07 06:55:47 +00:00
parent 850188d5da
commit 6b536c206a
2 changed files with 9 additions and 4 deletions

View File

@ -32,12 +32,12 @@ uses
type
timported_item = class(TLinkedListItem)
ordnr : word;
ordnr : longint;
name,
func : pstring;
lab : tasmlabel;
is_var : boolean;
constructor Create(const n,s : string;o : word);
constructor Create(const n,s : string;o : longint);
constructor Create_var(const n,s : string);
destructor Destroy;override;
end;
@ -98,7 +98,7 @@ uses
Timported_item
****************************************************************************}
constructor timported_item.Create(const n,s : string;o : word);
constructor timported_item.Create(const n,s : string;o : longint);
begin
inherited Create;
func:=stringdup(n);

View File

@ -1132,6 +1132,7 @@ var
i : longint;
AsBinStr : string[80];
StripStr,
GCSectionsStr,
RelocStr,
AppTypeStr,
ImageBaseStr : string[40];
@ -1145,9 +1146,12 @@ begin
AppTypeStr:='';
ImageBaseStr:='';
StripStr:='';
GCSectionsStr:='';
AsBinStr:=FindUtil(utilsprefix+'as');
if RelocSection then
RelocStr:='--base-file base.$$$';
if use_smartlink_section then
GCSectionsStr:='--gc-sections';
if apptype=app_gui then
AppTypeStr:='--subsystem windows';
if assigned(DLLImageBase) then
@ -1177,6 +1181,7 @@ begin
Replace(cmdstr,'$RELOC',RelocStr);
Replace(cmdstr,'$IMAGEBASE',ImageBaseStr);
Replace(cmdstr,'$STRIP',StripStr);
Replace(cmdstr,'$GCSECTIONS',GCSectionsStr);
if not DefFile.Empty then
begin
DefFile.WriteFile;
@ -1619,7 +1624,7 @@ function tDLLScannerWin32.GetEdata(HeaderEntry:cardinal):longbool;
function tDLLScannerWin32.scan(const binname:string):longbool;
var
OldFileMode:longint;
OldFileMode:byte;
hs,
foundimp : string;
begin