mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 14:47:55 +02:00
* ELF linker: track relocation style (REL or RELA) of each input section and use it instead of global default on MIPS targets. This fixes internal linking of tests/test/units/system/tres*.pp.
git-svn-id: trunk@29070 -
This commit is contained in:
parent
9fdfe4f474
commit
a4053370fc
@ -207,6 +207,8 @@ implementation
|
||||
result:=R_MIPS_NONE;
|
||||
RELOC_ABSOLUTE:
|
||||
result:=R_MIPS_32;
|
||||
RELOC_GOTOFF: {For case jumptables only }
|
||||
result:=R_MIPS_GPREL32;
|
||||
else
|
||||
result:=0;
|
||||
InternalError(2012110602);
|
||||
@ -809,7 +811,7 @@ implementation
|
||||
else
|
||||
reltyp:=objreloc.ftype;
|
||||
|
||||
if ElfTarget.relocs_use_addend then
|
||||
if (oso_rela_relocs in objsec.SecOptions) then
|
||||
address:=objreloc.orgsize
|
||||
else
|
||||
begin
|
||||
|
@ -145,7 +145,9 @@ interface
|
||||
{ Contains only strings }
|
||||
oso_strings,
|
||||
{ Must be cloned when writing separate debug file }
|
||||
oso_debug_copy
|
||||
oso_debug_copy,
|
||||
{ Has relocations with explicit addends (ELF-specific) }
|
||||
oso_rela_relocs
|
||||
);
|
||||
|
||||
TObjSectionOptions = set of TObjSectionOption;
|
||||
|
@ -1334,6 +1334,8 @@ implementation
|
||||
FReader.Seek(secrec.relocpos);
|
||||
if secrec.sec=nil then
|
||||
InternalError(2012060203);
|
||||
if (secrec.relentsize=3*sizeof(pint)) then
|
||||
with secrec.sec do SecOptions:=SecOptions+[oso_rela_relocs];
|
||||
for i:=0 to secrec.relocs-1 do
|
||||
begin
|
||||
FReader.Read(rel,secrec.relentsize);
|
||||
|
Loading…
Reference in New Issue
Block a user