|
@@ -2974,9 +2974,12 @@ implementation
|
|
|
else
|
|
|
begin
|
|
|
currsym:=objdata.symbolref(oper[0]^.ref^.symbol);
|
|
|
- if (currsym.bind<>AB_LOCAL) and (currsym.objsection<>objdata.CurrObjSec) then
|
|
|
+ if (currsym.bind<>AB_LOCAL) or (currsym.objsection<>objdata.CurrObjSec) then
|
|
|
begin
|
|
|
- objdata.writereloc(oper[0]^.ref^.offset,0,currsym,RELOC_RELATIVE_24);
|
|
|
+ if (opcode<>A_BL) or (condition<>C_None) then
|
|
|
+ objdata.writereloc(oper[0]^.ref^.offset,0,currsym,RELOC_RELATIVE_24)
|
|
|
+ else
|
|
|
+ objdata.writereloc(oper[0]^.ref^.offset,0,currsym,RELOC_RELATIVE_CALL);
|
|
|
bytes:=bytes or $fffffe; // TODO: Not sure this is right, but it matches the output of gas
|
|
|
end
|
|
|
else
|