diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-03-09 07:44:07 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-03-09 07:44:07 +0000 |
commit | 1e5f1d862bb36bd6e4e50126e5e693fe8cbd0201 (patch) | |
tree | b322982a520c39ea26741fcf0ba2f0f8162742fb | |
parent | 6fadea9f1d26e09e7da4c4c6ae2ba976fef73c25 (diff) | |
download | glibc-1e5f1d862bb36bd6e4e50126e5e693fe8cbd0201.tar glibc-1e5f1d862bb36bd6e4e50126e5e693fe8cbd0201.tar.gz glibc-1e5f1d862bb36bd6e4e50126e5e693fe8cbd0201.tar.bz2 glibc-1e5f1d862bb36bd6e4e50126e5e693fe8cbd0201.zip |
Update.
* sysdeps/i386/dl-machine.h: Define ARCH_FIXUP_ATTRIBUTE and use
it in the fixup function declarations.
* elf/dl-runtime.c: If ARCH_FIXUP_ATTRIBUTE is not defined,
provide dummy definition. Use macro in fixup function
definitions.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | elf/dl-runtime.c | 10 | ||||
-rw-r--r-- | sysdeps/i386/dl-machine.h | 9 |
3 files changed, 19 insertions, 5 deletions
@@ -1,5 +1,10 @@ 2004-03-08 Ulrich Drepper <drepper@redhat.com> + * sysdeps/i386/dl-machine.h: Define ARCH_FIXUP_ATTRIBUTE and use + it in the fixup function declarations. + * elf/dl-runtime.c: If ARCH_FIXUP_ATTRIBUTE is not defined, + provide dummy definition. Use macro in fixup function + definitions. * sysdeps/unix/sysv/linux/i386/vfork.S: If SAVE_PID and RESTORE_PID are defined, use it. diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c index ca936d0052..a0aecda2e8 100644 --- a/elf/dl-runtime.c +++ b/elf/dl-runtime.c @@ -36,6 +36,12 @@ # define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym)) #endif +/* The fixup functions might have need special attributes. If none + are provided define the macro as empty. */ +#ifndef ARCH_FIXUP_ATTRIBUTE +# define ARCH_FIXUP_ATTRIBUTE +#endif + /* This function is called through a special trampoline from the PLT the first time each PLT entry is called. We must perform the relocation @@ -46,7 +52,7 @@ #ifndef ELF_MACHINE_NO_PLT static ElfW(Addr) -__attribute ((used, noinline)) +__attribute ((used, noinline)) ARCH_FIXUP_ATTRIBUTE fixup ( # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS ELF_MACHINE_RUNTIME_FIXUP_ARGS, @@ -122,7 +128,7 @@ fixup ( #if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__ static ElfW(Addr) -__attribute ((used, noinline)) +__attribute ((used, noinline)) ARCH_FIXUP_ATTRIBUTE profile_fixup ( #ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS ELF_MACHINE_RUNTIME_FIXUP_ARGS, diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h index 6ba13c4b01..26abbfb64a 100644 --- a/sysdeps/i386/dl-machine.h +++ b/sysdeps/i386/dl-machine.h @@ -154,11 +154,14 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) destroys the passed register information. */ /* GKM FIXME: Fix trampoline to pass bounds so we can do without the `__unbounded' qualifier. */ -static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset) - __attribute__ ((regparm (2), unused)); +#define ARCH_FIXUP_ATTRIBUTE __attribute__ ((regparm (3), unused)) + +static ElfW(Addr) fixup (struct link_map *__unbounded l, + ElfW(Word) reloc_offset) + ARCH_FIXUP_ATTRIBUTE; static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset, ElfW(Addr) retaddr) - __attribute__ ((regparm (3), unused)); + ARCH_FIXUP_ATTRIBUTE; # endif /* This code is used in dl-runtime.c to call the `fixup' function |