This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] _dl_fini: Remove internal_function attribute
- From: fweimer at redhat dot com (Florian Weimer)
- To: libc-alpha at sourceware dot org
- Date: Mon, 14 Aug 2017 12:29:15 +0200
- Subject: [PATCH] _dl_fini: Remove internal_function attribute
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fweimer at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0F52719D06E
The i386 startup code needs adjusting because it calls the function
and the ABI has changed.
2017-08-14 Florian Weimer <fweimer@redhat.com>
* elf/rtld.c (_dl_start): Remove internal_function.
* sysdeps/i386/dl-machine.h (RTLD_START): Adjust call to
_dl_start.
diff --git a/elf/rtld.c b/elf/rtld.c
index 1772f89ea8..d8e75c02e6 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -439,7 +439,7 @@ _dl_start_final (void *arg, struct dl_start_final_info *info)
return start_addr;
}
-static ElfW(Addr) __attribute_used__ internal_function
+static ElfW(Addr) __attribute_used__
_dl_start (void *arg)
{
#ifdef DONT_USE_BOOTSTRAP_MAP
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 9ee9d02c36..924de953b7 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -150,9 +150,11 @@ extern ElfW(Addr) _dl_profile_fixup (struct link_map *l,
.globl _start\n\
.globl _dl_start_user\n\
_start:\n\
- # Note that _dl_start gets the parameter in %eax.\n\
movl %esp, %eax\n\
+ subl $12, %esp\n\
+ pushl %eax\n\
call _dl_start\n\
+ addl $16, %esp\n\
_dl_start_user:\n\
# Save the user entry point address in %edi.\n\
movl %eax, %edi\n\