diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-02-12 18:03:41 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-02-12 18:03:41 +0000 |
commit | 10b8c2be33a5179f2010d64b090c9ef41cde7756 (patch) | |
tree | 95d6106d7bf72c0fd85f9859f4d660e9994cd6f6 | |
parent | cb405b2987880c58c13e5988e39b3e50d3cb1ebf (diff) | |
parent | 601e7d33f73b213eea7fd0560b6c8162bb264418 (diff) | |
download | bionic-10b8c2be33a5179f2010d64b090c9ef41cde7756.tar.gz |
Merge "crtbegin: Correctly align ESP to 16 for __i386__" into ndk-release-r17
-rw-r--r-- | libc/arch-common/bionic/crtbegin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/arch-common/bionic/crtbegin.c b/libc/arch-common/bionic/crtbegin.c index 31ad62184..c4d2a5a35 100644 --- a/libc/arch-common/bionic/crtbegin.c +++ b/libc/arch-common/bionic/crtbegin.c @@ -53,7 +53,7 @@ __asm__(PRE "mov x0,sp; b _start_main" POST); #elif defined(__arm__) __asm__(PRE "mov r0,sp; b _start_main" POST); #elif defined(__i386__) -__asm__(PRE "movl %esp,%eax; andl $~0xf,%esp; pushl %eax; calll _start_main" POST); +__asm__(PRE "movl %esp,%eax; andl $~0xf,%esp; subl $12,%esp; pushl %eax; calll _start_main" POST); #elif defined(__x86_64__) __asm__(PRE "movq %rsp,%rdi; andq $~0xf,%rsp; callq _start_main" POST); #else |