mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 10:49:20 +02:00
* use automatic ppc64/linux got/toc entry generation by the linker if possible - removes the need of some workarounds
git-svn-id: trunk@8031 -
This commit is contained in:
parent
86823a8c86
commit
1cc1d4ebf2
@ -1903,15 +1903,7 @@ var
|
||||
ref: treference;
|
||||
symname : string;
|
||||
begin
|
||||
maybe_new_object_file(current_asmdata.asmlists[al_picdata]);
|
||||
symname := '_$' + current_asmdata.name + '$got$' + symbol;
|
||||
l:=current_asmdata.getasmsymbol(symname);
|
||||
if not(assigned(l)) then begin
|
||||
l:=current_asmdata.DefineAsmSymbol(symname, AB_COMMON, AT_DATA);
|
||||
current_asmdata.asmlists[al_picdata].concat(tai_section.create(sec_toc, '.toc', 8));
|
||||
current_asmdata.asmlists[al_picdata].concat(tai_symbol.create_global(l,0));
|
||||
current_asmdata.asmlists[al_picdata].concat(tai_directive.create(asd_toc_entry, symbol + '[TC], ' + symbol));
|
||||
end;
|
||||
l:=current_asmdata.getasmsymbol(symbol);
|
||||
reference_reset_symbol(ref,l,0);
|
||||
ref.base := NR_R2;
|
||||
ref.refaddr := addr_pic;
|
||||
@ -2177,7 +2169,7 @@ begin
|
||||
end;
|
||||
reference_reset_symbol(ref,l,0);
|
||||
ref.base := NR_R2;
|
||||
ref.refaddr := addr_pic;
|
||||
ref.refaddr := addr_no;
|
||||
|
||||
{$IFDEF EXTDEBUG}
|
||||
list.concat(tai_comment.create(strpnew('loading value from TOC reference for ' + symname)));
|
||||
|
@ -123,7 +123,11 @@ unit agppcgas;
|
||||
s := s+refaddr2str[refaddr];
|
||||
end;
|
||||
{$ifdef cpu64bit}
|
||||
if (refaddr = addr_pic) then s := s + ')';
|
||||
if (refaddr = addr_pic) then
|
||||
if (target_info.system <> system_powerpc64_linux) then
|
||||
s := s + ')'
|
||||
else
|
||||
s := s + ')@got';
|
||||
{$endif cpu64bit}
|
||||
|
||||
if (index=NR_NO) and (base<>NR_NO) then
|
||||
|
Loading…
Reference in New Issue
Block a user