* 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:
sergei 2012-07-02 15:43:33 +00:00
parent b497d53a98
commit 37b8cd1b7a

View File

@ -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