Rich Felker dixit:
>Is there anything weird about how these objects were declared that
>might have caused ld not to resolve them statically like it should? It
>seems odd that these data symbols, but not any other ones, would be
>left as symbolic relocations.
I don’t think so?
In I already
poste
On Fri, Apr 05, 2024 at 05:04:37AM +, Thorsten Glaser wrote:
> Markus Wichmann dixit:
>
> >can check with readelf -r what the relocation types are. If they are not
> >relative, they will not be processed.
>
> Gotcha! They are all R_390_RELATIVE except for:
>
> 00045ff0 00110016 R_39
* Thorsten Glaser [2024-04-05 05:04:37 +]:
> Markus Wichmann dixit:
>
> >can check with readelf -r what the relocation types are. If they are not
> >relative, they will not be processed.
>
> Gotcha! They are all R_390_RELATIVE except for:
>
> 00045ff0 00110016 R_390_64 000
Am Fri, Apr 05, 2024 at 05:58:15AM + schrieb Thorsten Glaser:
> Markus Wichmann dixit:
> >In any case, the emission of non-relative relocations is the issue here,
> >and it is coming from the linker.
>
> They are present in the glibc static-pie binary as well, though.
> And tbh they look to me
Markus Wichmann dixit:
>I may not really know what I am talking about, so take this with a grain
>of salt, but isn't this missing a -Bsymbolic somewhere? Ironically, that
>switch causes ld to not emit symbolic relocations. I seem to remember
>reading long ago in Rich's initial -static-pie proposal
Am Fri, Apr 05, 2024 at 05:04:37AM + schrieb Thorsten Glaser:
> Should be correct:
>
> /usr/libexec/gcc/s390x-linux-gnu/13/collect2 -fno-lto -dynamic-linker
> /lib/ld-musl-s390x.so.1 -nostdlib -static -static -pie --no-dynamic-linker -o
> mksh /usr/lib/s390x-linux-musl/rcrt1.o /usr/lib/s390x
Markus Wichmann dixit:
>can check with readelf -r what the relocation types are. If they are not
>relative, they will not be processed.
Gotcha! They are all R_390_RELATIVE except for:
00045ff0 00110016 R_390_64 00042c58 u_ops + 70
00045ff8 00110016 R_390_64
Hi,
in static-pie, relocations get processed in _start, before main() is
called. In musl, this is done by linking with rcrt1.o as start file
instead of crt1.o. And that file processes all relative relocations. You
can check with readelf -r what the relocation types are. If they are not
relative, t
Dixi quod…
>Now I (or someone) is going to have to reduce that to a testcase, so
No success with that, unfortunately.
>But this does seem to be a toolchain bug: adding -static-pie to the
>glibc dynamic-pie link command and…
>
>(gdb) print initcoms
>$1 = {0xda494 "typeset", 0x0, 0x0, 0x0, 0xda494
Dixi quod…
>Hmm, actually… I could… test whether that one fixes static-pie
>on zelenka. Or at least the same approach. I’ll get back with
>report from that.
Having looked at the spec file, the only extra things the stock
specs do that the overriding specs don’t is:
*link:
[…] %{!static|static-pi
10 matches
Mail list logo