mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
* dlfcn/dlfcn.c (init): Put it in .init_array section.
This commit is contained in:
parent
91adb529b0
commit
1a53c052c3
@ -1,3 +1,7 @@
|
||||
2005-01-25 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* dlfcn/dlfcn.c (init): Put it in .init_array section.
|
||||
|
||||
2005-02-10 Roland McGrath <roland@redhat.com>
|
||||
|
||||
[BZ #632]
|
||||
|
@ -23,11 +23,17 @@
|
||||
int __dlfcn_argc attribute_hidden;
|
||||
char **__dlfcn_argv attribute_hidden;
|
||||
|
||||
|
||||
void
|
||||
__attribute__ ((constructor))
|
||||
#ifdef HAVE_INITFINI_ARRAY
|
||||
static void
|
||||
init (int argc, char *argv[])
|
||||
{
|
||||
__dlfcn_argc = argc;
|
||||
__dlfcn_argv = argv;
|
||||
}
|
||||
|
||||
static void (*const init_array []) (int argc, char *argv[])
|
||||
__attribute__ ((section (".init_array"), aligned (sizeof (void *))))
|
||||
__attribute_used__ = { init };
|
||||
#else
|
||||
# error "Need linker with .init_array support."
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user