mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Thorsten Glaser <tg@mirbsd.de>
To: musl@lists.openwall.com
Cc: 1068350@bugs.debian.org, debian-glibc@lists.debian.org, doko@debian.org
Subject: 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
Date: Fri, 5 Apr 2024 05:04:37 +0000 (UTC)	[thread overview]
Message-ID: <Pine.BSM.4.64L.2404050501580.18654@herc.mirbsd.org> (raw)
In-Reply-To: <Zg956D6oPYIOTz15@voyager>

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.

>Is it possible you are linking in the wrong start file? gcc -v should
>output the command line it feeds to the linker.

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-linux-musl/crti.o /usr/lib/gcc/s390x-linux-gnu/13/crtbeginS.o -L/usr/lib/s390x-linux-musl -L /usr/lib/gcc/s390x-linux-gnu/13/. -z relro -z now --as-needed -z text --eh-frame-hdr lalloc.o edit.o eval.o exec.o expr.o funcs.o histrap.o jobs.o lex.o main.o misc.o shf.o syn.o tree.o var.o ulimit.o --start-group /usr/lib/gcc/s390x-linux-gnu/13/libgcc.a /usr/lib/gcc/s390x-linux-gnu/13/libgcc_eh.a -lc --end-group /usr/lib/gcc/s390x-linux-gnu/13/crtendS.o /usr/lib/s390x-linux-musl/crtn.o

HTH & HAND,
//mirabilos
-- 
„Cool, /usr/share/doc/mksh/examples/uhr.gz ist ja ein Grund,
mksh auf jedem System zu installieren.“
	-- XTaran auf der OpenRheinRuhr, ganz begeistert
(EN: “[…]uhr.gz is a reason to install mksh on every system.”)

  reply	other threads:[~2024-04-05  5:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <171218457890.157989.17235252523998125898.reportbug@zelenka.debian.org>
2024-04-03 23:57 ` [musl] Re: Bug#1068350: musl: miscompiles (runtime problems) on s390x with static-pie Thorsten Glaser
2024-04-04 10:44   ` Szabolcs Nagy
2024-04-04 10:54     ` Szabolcs Nagy
2024-04-04 19:50       ` [musl] Re: Bug#1068350: musl: miscompiles (runtime problems) on riscv64 and " Thorsten Glaser
2024-04-04 20:26         ` Rich Felker
2024-04-04 20:40           ` Thorsten Glaser
2024-04-04 21:18             ` [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
2024-04-05  0:26               ` Thorsten Glaser
2024-04-05  4:11                 ` Markus Wichmann
2024-04-05  5:04                   ` Thorsten Glaser [this message]
2024-04-05  5:31                     ` Markus Wichmann
2024-04-05  5:58                       ` Thorsten Glaser
2024-04-05  6:42                         ` Markus Wichmann
2024-04-05  6:48                     ` Szabolcs Nagy
2024-04-06  3:00                     ` Rich Felker
2024-04-06 15:18                       ` Thorsten Glaser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.BSM.4.64L.2404050501580.18654@herc.mirbsd.org \
    --to=tg@mirbsd.de \
    --cc=1068350@bugs.debian.org \
    --cc=debian-glibc@lists.debian.org \
    --cc=doko@debian.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).