This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[patch] Fix BZ 23606 -- Missing ENDBR32 in sysdeps/i386/start.S
- From: Terry Guo <terry dot xpguo at gmail dot com>
- To: libc-alpha at sourceware dot org
- Cc: hongjiu dot lu at intel dot com
- Date: Fri, 7 Sep 2018 15:06:22 +0800
- Subject: [patch] Fix BZ 23606 -- Missing ENDBR32 in sysdeps/i386/start.S
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. */