This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Fix BZ 23606 -- Missing ENDBR32 in sysdeps/i386/start.S
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Terry Guo <terry dot xpguo at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 11 Sep 2018 13:47:10 -0700
- Subject: Re: [patch] Fix BZ 23606 -- Missing ENDBR32 in sysdeps/i386/start.S
- References: <CAATtE7D_q4qd4Y9uTP-JmfJZ_zGT01HYYtKZW0L3_Q+v3TCegA@mail.gmail.com>
On Fri, Sep 7, 2018 at 12:06 AM, Terry Guo <terry.xpguo@gmail.com> wrote:
> Hello,
>
> The patch is to fix this issue by wrapping the _start function with
> ENTRY and END just like what we did for 64bit target. Tested with
> glibc 32bit build, there is no regression. OK for trunk?
>
> BR,
> Terry
>
>
> 2018-09-07 H.J. Lu <hongjiu.lu@intel.com>
> Xuepeng Guo <xuepeng.guo@intel.com>
>
> [BZ #23606]
> * sysdeps/i386/start.S: Wrap _start function with ENTRY and END.
>
>
> diff --git a/sysdeps/i386/start.S b/sysdeps/i386/start.S
> index 91035fa83f..e35e9bd31b 100644
> --- a/sysdeps/i386/start.S
> +++ b/sysdeps/i386/start.S
> @@ -52,10 +52,11 @@
> NULL
> */
>
> - .text
> - .globl _start
> - .type _start,@function
> -_start:
> +#include <sysdep.h>
> +
> +ENTRY (_start)
> + /* Clearing frame pointer is insufficient, use CFI. */
> + cfi_undefined (eip)
> /* Clear the frame pointer. The ABI suggests this be done, to mark
> the outermost frame obviously. */
> xorl %ebp, %ebp
> @@ -131,6 +132,7 @@ _start:
> 1: movl (%esp), %ebx
> ret
> #endif
> +END (_start)
>
> /* To fulfill the System V/i386 ABI we need this symbol. Yuck, it's so
> meaningless since we don't support machines < 80386. */
LGTM. Please check it in.
If you don't have an account, please send me an attachment of
"git format-patch". I will check it in for you.
Thanks.
--
H.J.