Message ID | 20230517191436.73636-10-bugaevc@gmail.com |
---|---|
State | Committed |
Commit | c93ee967cd688bc6d43c795b48e988075655a67f |
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 29825389364F for <patchwork@sourceware.org>; Wed, 17 May 2023 19:16:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 29825389364F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684350993; bh=lDW7m9qT30zUHDJ7STKcuPub1TiTzDZj1uSu9leu8PE=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=L6kyGe7x5JTR2fFnPJq/IZx1ap2pQFfw8DjIYsDS00+zPjrZFNPqpqNEmaJyzoo1P ZvglLoMLwLL+oTk8v2s9u6hJsB82pjqMqqhGXS6OPTTr0csAdCAiOx+nCzMbaLAeQ/ 8t03Vw2pPzukhKSLKXBxzwr3P38VNs+vrCkv2qak= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by sourceware.org (Postfix) with ESMTPS id 2D48C3856DDF for <libc-alpha@sourceware.org>; Wed, 17 May 2023 19:14:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2D48C3856DDF Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-4f383d6f2f8so1431838e87.2 for <libc-alpha@sourceware.org>; Wed, 17 May 2023 12:14:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684350891; x=1686942891; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lDW7m9qT30zUHDJ7STKcuPub1TiTzDZj1uSu9leu8PE=; b=J/aGl5/c97gMBxMp641c6erP4cH8Qlj4oT/E69SAT2AV2cZWGgxrW2h356xF+Bltxi vEDypWC818K8vK4LapCjgpdtAq++0mpHkEQhKBW/kvbKxjV4LVX9arVw1kra2//2/99K T5XJGALggx0AvAt0vAVTprzR785zz5q8k5R7e+SQEiMRx7yD39aOM3iJBXRqBBXwjBni diXcKOr8BZtZBm1fqkOzb28saiTMtoNa2hcqg/FXTxDvOhXDi8LZG7HHn1xuBylvY2lr ZwnjvSnApxgSiUlHc2kRWxE/DFWK1d8fcqnNTfw3+C/RyJ+Fn0qLWbSEbZcz9SMQRCZK q2Bw== X-Gm-Message-State: AC+VfDxq8+ePm8KpGNL7eiUF64wO1DwGr3WwzwDpxlgqZ0OqmXa3c26k pP4KkU3WOgJtWO51ycK7oMvZ3rI75zI= X-Google-Smtp-Source: ACHHUZ5MoFgLF8bdigsaFiqKTl4k0n94vnYovclKrTz/G4UQB+MoYTCX4RtVQGF2ylqIL+exlEWz/w== X-Received: by 2002:ac2:4a76:0:b0:4f2:7b64:f16f with SMTP id q22-20020ac24a76000000b004f27b64f16fmr472508lfp.52.1684350891141; Wed, 17 May 2023 12:14:51 -0700 (PDT) Received: from surface-pro-6.. ([194.190.106.50]) by smtp.gmail.com with ESMTPSA id o18-20020ac24352000000b004eed8de597csm3415744lfl.32.2023.05.17.12.14.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 May 2023 12:14:50 -0700 (PDT) To: libc-alpha@sourceware.org, bug-hurd@gnu.org Subject: [PATCH 09/10] hurd: Also make it possible to call strlen very early Date: Wed, 17 May 2023 22:14:35 +0300 Message-Id: <20230517191436.73636-10-bugaevc@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230517191436.73636-1-bugaevc@gmail.com> References: <20230517191436.73636-1-bugaevc@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Sergey Bugaev via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Sergey Bugaev <bugaevc@gmail.com> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Stack setup & misc fixes for x86_64-gnu
|
|
Checks
Context | Check | Description |
---|---|---|
dj/TryBot-apply_patch | success | Patch applied to master at the time it was sent |
Commit Message
Sergey Bugaev
May 17, 2023, 7:14 p.m. UTC
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>
---
sysdeps/mach/hurd/x86_64/static-start.S | 3 +++
1 file changed, 3 insertions(+)
Comments
Applied, thanks! Sergey Bugaev, le mer. 17 mai 2023 22:14:35 +0300, a ecrit: > 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> > --- > 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 cc8e2410..0fed375c 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 > -- > 2.40.1 > >
diff --git a/sysdeps/mach/hurd/x86_64/static-start.S b/sysdeps/mach/hurd/x86_64/static-start.S index cc8e2410..0fed375c 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