diff options
author | Andreas Schwab <aschwab@redhat.com> | 2009-06-10 14:04:22 +0200 |
---|---|---|
committer | Andreas Schwab <aschwab@redhat.com> | 2009-06-10 14:04:22 +0200 |
commit | 0d02cb10e8dd8639b86450cf8e597cf5e2e09894 (patch) | |
tree | 0f2174db43a501b946f0600d1b91ae4117977b04 /csu | |
parent | dfbbe67270efa9c03f9444d50d2f98a7a64622b4 (diff) | |
parent | 88ea382fda5af7717f85bb19837c9c99094f3df4 (diff) | |
download | glibc-0d02cb10e8dd8639b86450cf8e597cf5e2e09894.tar.gz glibc-0d02cb10e8dd8639b86450cf8e597cf5e2e09894.tar.xz glibc-0d02cb10e8dd8639b86450cf8e597cf5e2e09894.zip |
Merge commit 'origin/master' into fedora/master
Conflicts: ChangeLog sysdeps/unix/sysv/linux/i386/sysconf.c sysdeps/x86_64/cacheinfo.c version.h
Diffstat (limited to 'csu')
-rw-r--r-- | csu/.cvsignore | 7 | ||||
-rw-r--r-- | csu/.gitignore | 1 | ||||
-rw-r--r-- | csu/elf-init.c | 34 |
3 files changed, 33 insertions, 9 deletions
diff --git a/csu/.cvsignore b/csu/.cvsignore deleted file mode 100644 index da6e41b953..0000000000 --- a/csu/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo -specs diff --git a/csu/.gitignore b/csu/.gitignore new file mode 100644 index 0000000000..d8933cf691 --- /dev/null +++ b/csu/.gitignore @@ -0,0 +1 @@ +specs diff --git a/csu/elf-init.c b/csu/elf-init.c index d0a518f9fb..0ea23c6193 100644 --- a/csu/elf-init.c +++ b/csu/elf-init.c @@ -1,5 +1,5 @@ /* Startup support for ELF initializers/finalizers in the main executable. - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -36,6 +36,20 @@ #include <stddef.h> +#if defined USE_MULTIARCH && !defined LIBC_NONSHARED +# include <link.h> +# include <dl-irel.h> + +# ifdef ELF_MACHINE_IRELA +extern const ElfW(Rela) __rela_iplt_start []; +extern const ElfW(Rela) __rela_iplt_end []; +# endif + +# ifdef ELF_MACHINE_IREL +extern const ElfW(Rel) __rel_iplt_start []; +extern const ElfW(Rel) __rel_iplt_end []; +# endif +#endif /* LIBC_NONSHARED */ /* These magic symbols are provided by the linker. */ extern void (*__preinit_array_start []) (int, char **, char **) @@ -83,7 +97,23 @@ __libc_csu_init (int argc, char **argv, char **envp) /* For dynamically linked executables the preinit array is executed by the dynamic linker (before initializing any shared object. */ -#ifndef LIBC_NONSHARED +#if defined USE_MULTIARCH && !defined LIBC_NONSHARED +# ifdef ELF_MACHINE_IRELA + { + const size_t size = __rela_iplt_end - __rela_iplt_start; + for (size_t i = 0; i < size; i++) + elf_irela (&__rela_iplt_start [i]); + } +# endif + +# ifdef ELF_MACHINE_IREL + { + const size_t size = __rel_iplt_end - __rel_iplt_start; + for (size_t i = 0; i < size; i++) + elf_irel (&__rel_iplt_start [i]); + } +# endif + /* For static executables, preinit happens rights before init. */ { const size_t size = __preinit_array_end - __preinit_array_start; |