mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 07:19:27 +02:00
* If relocation to a local label cannot be translated into (section+offset), then the target symbol must be written into symbol table. Fixes IE 200603012 in number of tests with -Cg on i386-linux (and possibly other targets with internal ELF assembler).
git-svn-id: trunk@21759 -
This commit is contained in:
parent
b497d53a98
commit
37b8cd1b7a
@ -940,6 +940,11 @@ implementation
|
||||
begin
|
||||
objreloc:=TObjRelocation.CreateSymbol(CurrObjSec.Size,p,reltype);
|
||||
CurrObjSec.ObjRelocations.Add(objreloc);
|
||||
{ If target is a local label and it isn't handled above,
|
||||
patch its type in order to get it written to symtable.
|
||||
This may happen e.g. when taking address of Pascal label in PIC mode. }
|
||||
if (p.bind=AB_LOCAL) and (p.typ=AT_LABEL) then
|
||||
p.typ:=AT_ADDR;
|
||||
end;
|
||||
end;
|
||||
if assigned(objreloc) then
|
||||
|
Loading…
Reference in New Issue
Block a user