public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Richard Earnshaw <Richard.Earnshaw@foss.arm.com>
To: Ra T <jupitertrain311@gmail.com>, binutils@sourceware.org
Subject: Re: R_AARCH64_CALL26 Relocation Error on Ubuntu 18.04
Date: Tue, 1 Mar 2022 13:29:25 +0000	[thread overview]
Message-ID: <77e611a2-ed1f-0905-f4a9-17c945503421@foss.arm.com> (raw)
In-Reply-To: <CAAz-jy9tVbwoSfN4GfL0BvZwn6UVFhcFz8Z9MCE1cekx1ofu9w@mail.gmail.com>



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.

  reply	other threads:[~2022-03-01 13:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-01  1:45 Ra T
2022-03-01 13:29 ` Richard Earnshaw [this message]
2022-03-09  0:26   ` Fangrui Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=77e611a2-ed1f-0905-f4a9-17c945503421@foss.arm.com \
    --to=richard.earnshaw@foss.arm.com \
    --cc=binutils@sourceware.org \
    --cc=jupitertrain311@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).