[Bug libc/23606] New: Missing ENDBR32 in sysdeps/i386/start.S

hjl.tools at gmail dot com sourceware-bugzilla@sourceware.org
Wed Sep 5 03:28:00 GMT 2018


https://sourceware.org/bugzilla/show_bug.cgi?id=23606

            Bug ID: 23606
           Summary: Missing ENDBR32 in sysdeps/i386/start.S
           Product: glibc
           Version: 2.29
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
                CC: drepper.fsp at gmail dot com, xuepeng.guo at intel dot com
  Target Milestone: ---
            Target: i386

sysdeps/i386/start.S has

        .text
        .globl _start
        .type _start,@function
_start:
        /* Clear the frame pointer.  The ABI suggests this be done, to mark
           the outermost frame obviously.  */
        xorl %ebp, %ebp

ENDBR32 is missing.  This patch should work:

diff --git a/sysdeps/i386/start.S b/sysdeps/i386/start.S
index 91035fa83f..4b7542c327 100644
--- a/sysdeps/i386/start.S
+++ b/sysdeps/i386/start.S
@@ -52,10 +52,9 @@
                                        NULL
 */

-       .text
-       .globl _start
-       .type _start,@function
-_start:
+#include <sysdep.h>
+
+ENTRY (_start)
        /* Clear the frame pointer.  The ABI suggests this be done, to mark
           the outermost frame obviously.  */
        xorl %ebp, %ebp
@@ -131,6 +130,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.  */

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list