mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 21:09:27 +02:00
+ added method TOmfObjData.AddImportSymbol, which adds symbols, imported from an
external dll to TOmfObjData.ImportLibraryList (similar to TInternalLinker.AddImportSymbol) git-svn-id: trunk@42542 -
This commit is contained in:
parent
d2371f4176
commit
fcb6072fae
@ -113,6 +113,7 @@ interface
|
|||||||
function createsection(atype:TAsmSectionType;const aname:string='';aorder:TAsmSectionOrder=secorder_default):TObjSection;override;
|
function createsection(atype:TAsmSectionType;const aname:string='';aorder:TAsmSectionOrder=secorder_default):TObjSection;override;
|
||||||
function reffardatasection:TObjSection;
|
function reffardatasection:TObjSection;
|
||||||
procedure writeReloc(Data:TRelocDataInt;len:aword;p:TObjSymbol;Reloctype:TObjRelocationType);override;
|
procedure writeReloc(Data:TRelocDataInt;len:aword;p:TObjSymbol;Reloctype:TObjRelocationType);override;
|
||||||
|
procedure AddImportSymbol(const libname,symname,symmangledname:TCmdStr;OrdNr: longint;isvar:boolean);
|
||||||
property MainSource: TPathStr read FMainSource;
|
property MainSource: TPathStr read FMainSource;
|
||||||
property ImportLibraryList:TFPHashObjectList read FImportLibraryList;
|
property ImportLibraryList:TFPHashObjectList read FImportLibraryList;
|
||||||
end;
|
end;
|
||||||
@ -918,6 +919,20 @@ implementation
|
|||||||
CurrObjSec.write(data,len);
|
CurrObjSec.write(data,len);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TOmfObjData.AddImportSymbol(const libname, symname,
|
||||||
|
symmangledname: TCmdStr; OrdNr: longint; isvar: boolean);
|
||||||
|
var
|
||||||
|
ImportLibrary : TImportLibrary;
|
||||||
|
ImportSymbol : TFPHashObject;
|
||||||
|
begin
|
||||||
|
ImportLibrary:=TImportLibrary(ImportLibraryList.Find(libname));
|
||||||
|
if not assigned(ImportLibrary) then
|
||||||
|
ImportLibrary:=TImportLibrary.Create(ImportLibraryList,libname);
|
||||||
|
ImportSymbol:=TFPHashObject(ImportLibrary.ImportSymbolList.Find(symname));
|
||||||
|
if not assigned(ImportSymbol) then
|
||||||
|
ImportSymbol:=TImportSymbol.Create(ImportLibrary.ImportSymbolList,symname,symmangledname,OrdNr,isvar);
|
||||||
|
end;
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TOmfObjOutput
|
TOmfObjOutput
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
Loading…
Reference in New Issue
Block a user