* Pass ExeOutput as argument to TObjSection.fixuprelocs, needed for ELF targets to relocate the complex GOT stuff.

* TExeSection.AddObjSection made virtual.
- TExeSymbol.ExeSection is nowhere used, removed.

git-svn-id: trunk@21626 -
This commit is contained in:
sergei 2012-06-16 22:33:26 +00:00
parent ac2de2c188
commit 7cda919547
2 changed files with 7 additions and 7 deletions

View File

@ -42,6 +42,7 @@ interface
TExeSection = class;
TExeSymbol = class;
TExeOutput = class;
TObjRelocationType = (
{ Relocation to absolute address }
@ -215,7 +216,7 @@ interface
procedure addsymReloc(ofs:aword;p:TObjSymbol;Reloctype:TObjRelocationType);
procedure addsectionReloc(ofs:aword;aobjsec:TObjSection;Reloctype:TObjRelocationType);
procedure AddSymbolDefine(p:TObjSymbol);
procedure FixupRelocs;virtual;
procedure FixupRelocs(Exe: TExeOutput);virtual;
procedure ReleaseData;
function FullName:string;
property Data:TDynamicArray read FData;
@ -350,7 +351,6 @@ interface
TExeSymbol = class(TFPHashObject)
ObjSymbol : TObjSymbol;
ExeSection : TExeSection;
State : TSymbolState;
{ Used for vmt references optimization }
VTable : TExeVTable;
@ -368,7 +368,7 @@ interface
SecOptions : TObjSectionOptions;
constructor create(AList:TFPHashObjectList;const AName:string);virtual;
destructor destroy;override;
procedure AddObjSection(objsec:TObjSection);
procedure AddObjSection(objsec:TObjSection);virtual;
property ObjSectionList:TFPObjectList read FObjSectionList;
property SecSymIdx:longint read FSecSymIdx write FSecSymIdx;
end;
@ -756,7 +756,7 @@ implementation
end;
procedure TObjSection.FixupRelocs;
procedure TObjSection.FixupRelocs(Exe:TExeOutput);
begin
end;
@ -2841,7 +2841,7 @@ implementation
objsec:=TObjSection(exesec.ObjSectionlist[j]);
if not objsec.Used then
internalerror(200603301);
objsec.FixupRelocs;
objsec.FixupRelocs(Self);
end;
end;
end;

View File

@ -110,7 +110,7 @@ interface
secidx : longword;
constructor create(AList:TFPHashObjectList;const Aname:string;Aalign:shortint;Aoptions:TObjSectionOptions);override;
procedure addsymsizereloc(ofs:aword;p:TObjSymbol;symsize:aword;reloctype:TObjRelocationType);
procedure fixuprelocs;override;
procedure fixuprelocs(Exe:TExeOutput);override;
end;
TDJCoffObjSection = class(TCoffObjSection)
@ -846,7 +846,7 @@ const pemagic : array[0..3] of byte = (
end;
procedure TCoffObjSection.fixuprelocs;
procedure TCoffObjSection.fixuprelocs(Exe:TExeOutput);
var
i,zero,address_size : longint;
objreloc : TObjRelocation;