Re: [musl] Re: Bug#1068350: musl: miscompiles (runtime problems) on riscv64 and s390x with static-pie → seems to be a toolchain bug after all, it does too hit glibc

2024-04-05 Thread Szabolcs Nagy
* 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  00042c58 u_ops + 70
> 00045ff8  00110016 R_390_64  00042c58 u_ops + 0
> 00047020  00110016 R_390_64  00042c58 u_ops + 80
> 00047088  00110016 R_390_64  00042c58 u_ops + 80
> 000470a8  00110016 R_390_64  00042c58 u_ops + b8
> 00047220  00110016 R_390_64  00042c58 u_ops + 80
> 00046900  00260016 R_390_64  00015af8 c_command + 0
> 00046940  00070016 R_390_64  00017238 c_exec + 0
> 00046ab0  00200016 R_390_64  00016a80 c_trap + 0
> 00047090  00250016 R_390_64  000430ac initvsn + 0
> 00047278  00550016 R_390_64  00047438 null_string + 2
> 
> That’s our missing strings.


this is not correct static pie.

glibc handles symbolic relocs, but there should not be
any non-local symbol in a static exe. you may want to
check the symbol table.

so s390 does not support static pie.
(arguably the elf is correct, if you expect a full
dynlinker in a static pie, but even then it's bad
quality linker output)



Re: [RFC PATCH v4 1/2] configure: Remove --enable-obsolete-nsl

2020-06-08 Thread Szabolcs Nagy
The 06/06/2020 22:09, Petr Vorel wrote:
> this means that *always* libnsl is only built as shared library for
> backward compatibility and the NSS modules libnss_compat, libnss_nis and
> libnss_nisplus are not built at all, libnsl's headers aren't installed.
> 
> This compatibility is kept only for architectures and ABIs that
> have been added in or before version 2.28.
> 
> Replacement implementations based on TIRPC, which additionally support
> IPv6, are available from .
> 
> NOTE: libnsl code depends on Sun RPC, e.g. on --enable-obsolete-rpc
> (installed libnsl headers use installed Sun RPC headers), which will be
> removed in following commit.
> 
> Signed-off-by: Petr Vorel 
...
> +* Remove configure option --enable-obsolete-nsl. libnsl is only built as 
> shared
> +  library for backward compatibility and the NSS modules libnss_compat,
> +  libnss_nis and libnss_nisplus are not built at all, libnsl's headers aren't
> +  installed. This compatibility is kept only for architectures and ABIs that
> +  have been added in or before version 2.28. Replacement implementations 
> based
> +  on TI-RPC, which additionally support IPv6, are available from
> +  .

can it cause libc update problems on systems that
have nsswitch.conf referencing those old nss libs?

maybe mention that configs may need to be updated?



Re: [RFC PATCH v2 0/2] Remove --enable-obsolete-nsl --enable-obsolete-rpc

2020-06-05 Thread Szabolcs Nagy
* Petr Vorel  [2020-06-05 18:53:53 +0200]:
> $ strace -o logfile -f -s 222 -tt make test 
> t=elf/tst-ldconfig-ld_so_conf-update
> original exit status 1
> error: xfopen.c:29: could not open /etc/ld.so.conf (mode "a+"): No such file 
> or directory
> error: 1 test failures
> running post-clean rsync
> 
> running under root (uh, that's ugly):
> error: xmkdirp.c:63: mkdir_p 
> ("/home/foo/build/glibc/remove-rpc.v2.second-commit/testroot.root/dev", 
> 0755): Permission denied
> 
> And indeed chroot
> "/home/foo/build/glibc/remove-rpc.v2.second-commit/testroot.root/"
> doesn't have etc directory. Simple creating etc directory and copying
> ld.so.conf does not help (I'm not surprised).

i would try to see why /etc is not created in the testroot.

unfortunately i dont know the details of how that is
supposed to work (i think there is a pristine testroot
that's created first and gets copied into testroot, see
if there is /etc there)