public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Samuel Thibault <sthibaul@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] hurd: Also make it possible to call strlen very early
Date: Wed, 17 May 2023 21:03:55 +0000 (GMT)	[thread overview]
Message-ID: <20230517210355.BFF133858D1E@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c93ee967cd688bc6d43c795b48e988075655a67f

commit c93ee967cd688bc6d43c795b48e988075655a67f
Author: Sergey Bugaev <bugaevc@gmail.com>
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 <bugaevc@gmail.com>
    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

                 reply	other threads:[~2023-05-17 21:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230517210355.BFF133858D1E@sourceware.org \
    --to=sthibaul@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).