summaryrefslogtreecommitdiff
path: root/compiler/ogelf.pas
diff options
context:
space:
mode:
authorsergei <sergei@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-07-29 09:30:40 +0000
committersergei <sergei@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-07-29 09:30:40 +0000
commitabadbb58f5c5cc5608f3b9ec301682521c5b4c17 (patch)
treec63fefe1dfa15a537872a78e3537ee15135bb631 /compiler/ogelf.pas
parent1c59b2117d9020f0253aa14873c84c00d30cd6a9 (diff)
downloadfpc-abadbb58f5c5cc5608f3b9ec301682521c5b4c17.tar.gz
+ MIPS internal linker: support TLS IE/LE and GPREL32 relocations, is now able to link tw14265.
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@25181 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/ogelf.pas')
-rw-r--r--compiler/ogelf.pas11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/ogelf.pas b/compiler/ogelf.pas
index 074005cd54..6782c6d472 100644
--- a/compiler/ogelf.pas
+++ b/compiler/ogelf.pas
@@ -76,6 +76,9 @@ interface
public
ident: TElfIdent;
flags: longword;
+{$ifdef mips}
+ gp_value: longword;
+{$endif mips}
constructor create(const n:string);override;
function sectionname(atype:TAsmSectiontype;const aname:string;aorder:TAsmSectionOrder):string;override;
procedure CreateDebugSections;override;
@@ -148,6 +151,7 @@ interface
class function CanReadObjData(AReader:TObjectreader):boolean;override;
function CreateSection(const shdr:TElfsechdr;index:longint;objdata:TObjData;
out secname:string):TElfObjSection;
+ function ReadBytes(offs:longint;out buf;len:longint):boolean;
end;
TElfVersionDef = class(TFPHashObject)
@@ -1474,6 +1478,13 @@ implementation
end;
+ function TElfObjInput.ReadBytes(offs:longint;out buf;len:longint):boolean;
+ begin
+ FReader.Seek(offs);
+ result:=FReader.Read(buf,len);
+ end;
+
+
procedure TElfObjInput.LoadSection(const shdr:TElfsechdr;index:longint;objdata:tobjdata);
var
sec: TElfObjSection;