public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* R_AARCH64_CALL26 Relocation Error on Ubuntu 18.04
@ 2022-03-01  1:45 Ra T
  2022-03-01 13:29 ` Richard Earnshaw
  0 siblings, 1 reply; 3+ messages in thread
From: Ra T @ 2022-03-01  1:45 UTC (permalink / raw)
  To: binutils

Has anyone seen this problem on NVidia's L4T (based on Ubuntu 18.04) with a
Jetson AGX Xavier?

I'm trying to compile Qt 5.15.8, and the opensource Chromium build
(QtWebEngine) is failing with the error:

"relocation truncated to fit: R_AARCH64_CALL26 against symbol ... defined
in .text section in /lib/aarch64-linux-gnu/libc.so.6"

The symbols listed are gettimeofday@@GLIBC2.17 and ntohs@@GLIBC_2.17.

It seems similar to this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1243559

But I could not find a more recent bug.  L4T 32.6.1 is using binutils 2.30,
g++ 7.5.

Sorry for newb questions, if this is the wrong mailing list let me know.

Regards,
Rad

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: R_AARCH64_CALL26 Relocation Error on Ubuntu 18.04
  2022-03-01  1:45 R_AARCH64_CALL26 Relocation Error on Ubuntu 18.04 Ra T
@ 2022-03-01 13:29 ` Richard Earnshaw
  2022-03-09  0:26   ` Fangrui Song
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Earnshaw @ 2022-03-01 13:29 UTC (permalink / raw)
  To: Ra T, binutils



On 01/03/2022 01:45, Ra T via Binutils wrote:
> Has anyone seen this problem on NVidia's L4T (based on Ubuntu 18.04) with a
> Jetson AGX Xavier?
> 
> I'm trying to compile Qt 5.15.8, and the opensource Chromium build
> (QtWebEngine) is failing with the error:
> 
> "relocation truncated to fit: R_AARCH64_CALL26 against symbol ... defined
> in .text section in /lib/aarch64-linux-gnu/libc.so.6"
> 
> The symbols listed are gettimeofday@@GLIBC2.17 and ntohs@@GLIBC_2.17.
> 
> It seems similar to this bug:
> https://bugzilla.redhat.com/show_bug.cgi?id=1243559
> 
> But I could not find a more recent bug.  L4T 32.6.1 is using binutils 2.30,
> g++ 7.5.
> 
> Sorry for newb questions, if this is the wrong mailing list let me know.
> 
> Regards,
> Rad

It's not a bug, the linker is telling you that the target of the call 
instruction is too far away from the instruction.  This can happen if 
your program or library contains too much compiled code.  It's most 
common when code is built without optimization.  You could also try 
building with -Os to reduce the amount of code generated.

If all else fails, you might need to partition your code into multiple 
shared libraries so that each is smaller and less than the limit imposed 
by the instruction set.

R.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: R_AARCH64_CALL26 Relocation Error on Ubuntu 18.04
  2022-03-01 13:29 ` Richard Earnshaw
@ 2022-03-09  0:26   ` Fangrui Song
  0 siblings, 0 replies; 3+ messages in thread
From: Fangrui Song @ 2022-03-09  0:26 UTC (permalink / raw)
  To: Richard Earnshaw; +Cc: Ra T, binutils

On 2022-03-01, Richard Earnshaw via Binutils wrote:
>
>
>On 01/03/2022 01:45, Ra T via Binutils wrote:
>>Has anyone seen this problem on NVidia's L4T (based on Ubuntu 18.04) with a
>>Jetson AGX Xavier?
>>
>>I'm trying to compile Qt 5.15.8, and the opensource Chromium build
>>(QtWebEngine) is failing with the error:
>>
>>"relocation truncated to fit: R_AARCH64_CALL26 against symbol ... defined
>>in .text section in /lib/aarch64-linux-gnu/libc.so.6"
>>
>>The symbols listed are gettimeofday@@GLIBC2.17 and ntohs@@GLIBC_2.17.
>>
>>It seems similar to this bug:
>>https://bugzilla.redhat.com/show_bug.cgi?id=1243559
>>
>>But I could not find a more recent bug.  L4T 32.6.1 is using binutils 2.30,
>>g++ 7.5.
>>
>>Sorry for newb questions, if this is the wrong mailing list let me know.
>>
>>Regards,
>>Rad
>
>It's not a bug, the linker is telling you that the target of the call 
>instruction is too far away from the instruction.  This can happen if 
>your program or library contains too much compiled code.  It's most 
>common when code is built without optimization.  You could also try 
>building with -Os to reduce the amount of code generated.
>
>If all else fails, you might need to partition your code into multiple 
>shared libraries so that each is smaller and less than the limit 
>imposed by the instruction set.
>
>R.

This is likely a bug. R_AARCH64_CALL26/R_AARCH64_JUMP26 have a range of
+-128MiB and the linker is expected to create range extension thunks
(veneers) automatically. The thunk code in ld may not be so reliable to
handle all cases.

Folks who have worked on ld/testsuite/ld-aarch64/farcall-*
may have some idea.

Diagnosing such an issue usually requires the reporter to provide the full
input to ld (https://sourceware.org/bugzilla/show_bug.cgi?id=26119).
The input is large, so the report may need to provide a downloadable
link.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-09  0:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01  1:45 R_AARCH64_CALL26 Relocation Error on Ubuntu 18.04 Ra T
2022-03-01 13:29 ` Richard Earnshaw
2022-03-09  0:26   ` Fangrui Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).