|
Message-ID: <1db459153e3f7be32cb469509c272977b9c2b381.camel@newton.cx>
Date: Wed, 06 Sep 2023 20:46:32 -0400
From: Peter Williams <peter@...ton.cx>
To: musl@...ts.openwall.com
Subject: aarch64 sigsetjmp relocation truncation bug, maybe
Hello,
I'm experiencing a software issue that I think maybe, might, possibly,
indicate a musl bug. I'm not at all familiar with the issues involved,
but it looks like emailing this list might be my best bet for testing
that hypothesis, so that's what I'm doing. Please CC me on any replies
as I'm not subscribed, and accept my apologies if I'm way off base
here.
The short answer is that I'm trying to link a large (~100 MB) static
executable for aarch64 and getting this error out of the binutils
linker:
/home/rust/sysroot-aarch64/usr/lib/libc.a(sigsetjmp.lo): in function `sigsetjmp':
/home/buildozer/aports/main/musl/src/v1.2.3/src/signal/aarch64/sigsetjmp.s:7:(.text+0x0):
relocation truncated to fit: R_AARCH64_CONDBR19 against symbol `setjmp'
defined in .text section in /home/rust/sysroot-aarch64/usr/lib/libc.a(setjmp.lo)
If I'm understanding correctly, the complaint is that a branch in
sigsetjmp that invokes setjmp is too far away from the definition of
setjmp. My very handwavey idea is that maybe for some reason my program
is causing the linker to want to locate setjmp() and sigsetjmp() really
far away from each other. If that's right, perhaps it would be possible
to modify the assembler code to be able to handle such a situation?
My build environment is extremely gnarly — I am running my build tools
inside a cross-compiling Alpine Linux chroot that in turn runs inside
an Ubuntu Docker container. (You don't want to know.) I can provide
more details if needed, as well as a script that leads up to the error
on my system, if you have CPU time to burn on the Docker container
build. But since the error seems to be localized within my aarch64
"libc.a", I'm hopeful that maybe this funky environment doesn't
actually affect the core situation here. As you might see in the output
above, I'm using musl 1.2.3.
Thanks for any insight,
Peter
Content of type "text/html" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.