|
|
Message-ID: <20251212143040.GU3520958@port70.net>
Date: Fri, 12 Dec 2025 15:30:40 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: Rich Felker <dalias@...c.org>
Cc: Alex Rønne Petersen <alex@...xrp.com>,
musl@...ts.openwall.com
Subject: Re: [PATCH] powerpc64: add nop after bl to start_c
* Rich Felker <dalias@...c.org> [2025-12-11 21:30:20 -0500]:
> On Thu, Dec 11, 2025 at 07:00:17PM +0100, Alex Rønne Petersen wrote:
> > To avoid errors like this:
> >
> > error: ld.lld: /home/ci/.cache/zig/o/ac8c1808c4a1f20ad8a0b179b5207ee7/crt1.o:(.text+0x24): call to save__start_c lacks nop, can't restore toc
> > ---
>
> Just a linker error message isn't sufficient justification for a
> change; it very well may be a linker bug, possibly a newly-introduced
> one. Can you explain what this message means, if/why you think it's
> valid, and which particular lld versions it's happening with?
i can reproduce the issue with CFLAGS=-mcpu=power10
and powerpc64le-linux-musl-cross from musl.cc
obj/ldso/dlstart.lo: in function `_dlstart':
dlstart.c:(.text+0x24): call to `_dlstart_c' lacks nop, can't restore toc; (toc save/adjust stub)
$ powerpc64le-linux-musl-readelf -sW obj/ldso/dlstart.lo |grep _dlstart
2: 0000000000000000 0 SECTION LOCAL DEFAULT 5 .text._dlstart_c
10: 0000000000000000 0 FUNC GLOBAL DEFAULT 1 _dlstart
12: 0000000000000000 712 FUNC GLOBAL HIDDEN [<localentry>: 1] 5 _dlstart_c
this looks related:
https://sourceware.org/bugzilla/show_bug.cgi?id=26164
the glibc fix is adding @notoc with new enough linkers:
https://sourceware.org/bugzilla/show_bug.cgi?id=26173
https://sourceware.org/git/?p=glibc.git;a=commit;h=7c7bcf3634e44cf7e001aaa302138c1ee0e58f8c
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.