[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



* Thorsten Glaser <tg@mirbsd.de> [2024-04-05 05:04:37 +0000]:
> 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:
> 
> 000000045ff0  001100000016 R_390_64          0000000000042c58 u_ops + 70
> 000000045ff8  001100000016 R_390_64          0000000000042c58 u_ops + 0
> 000000047020  001100000016 R_390_64          0000000000042c58 u_ops + 80
> 000000047088  001100000016 R_390_64          0000000000042c58 u_ops + 80
> 0000000470a8  001100000016 R_390_64          0000000000042c58 u_ops + b8
> 000000047220  001100000016 R_390_64          0000000000042c58 u_ops + 80
> 000000046900  002600000016 R_390_64          0000000000015af8 c_command + 0
> 000000046940  000700000016 R_390_64          0000000000017238 c_exec + 0
> 000000046ab0  002000000016 R_390_64          0000000000016a80 c_trap + 0
> 000000047090  002500000016 R_390_64          00000000000430ac initvsn + 0
> 000000047278  005500000016 R_390_64          0000000000047438 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)


Reply to: