From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1792) id BFF133858D1E; Wed, 17 May 2023 21:03:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BFF133858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684357435; bh=olc4senOVYpo4mqWsGRz7Rk8ecjk6rSZ1ktPPilPRFw=; h=From:To:Subject:Date:From; b=gJUSlP5jHXVgSAaFG1wlykX1YroMO0PpaE0DgIumtWD6Z1mKoiqthZDLaMqUnzh0R dGjalzeBt7K7z2AOhwKh1MYkfhOlEig09VlWdYCBRN8nCxdQDG3DnGD8/M5tW1SLJR I8TFOUO3m8H7vu+GzsdrQBZc4MhcX7jsc0EHfaUI= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Samuel Thibault To: glibc-cvs@sourceware.org Subject: [glibc] hurd: Also make it possible to call strlen very early X-Act-Checkin: glibc X-Git-Author: Sergey Bugaev X-Git-Refname: refs/heads/master X-Git-Oldrev: 70fd6b3b230f58782a196b1075513a24f2376077 X-Git-Newrev: c93ee967cd688bc6d43c795b48e988075655a67f Message-Id: <20230517210355.BFF133858D1E@sourceware.org> Date: Wed, 17 May 2023 21:03:55 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c93ee967cd688bc6d43c795b48e988075655a67f commit c93ee967cd688bc6d43c795b48e988075655a67f Author: Sergey Bugaev Date: Wed May 17 22:14:35 2023 +0300 hurd: Also make it possible to call strlen very early strlen, which is another ifunc-selected function, is invoked during early static executable startup if the argv arrives from the exec server. Make it not crash. Checked on x86_64-gnu: statically linked executables launched after the exec server is up now start up successfully. Signed-off-by: Sergey Bugaev Message-Id: <20230517191436.73636-10-bugaevc@gmail.com> Diff: --- sysdeps/mach/hurd/x86_64/static-start.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sysdeps/mach/hurd/x86_64/static-start.S b/sysdeps/mach/hurd/x86_64/static-start.S index cc8e2410ea..0fed375cdf 100644 --- a/sysdeps/mach/hurd/x86_64/static-start.S +++ b/sysdeps/mach/hurd/x86_64/static-start.S @@ -22,6 +22,9 @@ _start: leaq __memcpy_sse2_unaligned(%rip), %rax movq %rax, memcpy@GOTPCREL(%rip) + leaq __strlen_sse2(%rip), %rax + movq %rax, strlen@GOTPCREL(%rip) + call _hurd_stack_setup xorq %rdx, %rdx jmp _start1