mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
Update.
1999-07-13 Andreas Schwab <schwab@suse.de> * elf/dl-runtime.c (fixup, profile_fixup): Call alloca to prevent inlining. Fixes PR libc/1198.
This commit is contained in:
parent
c68cb81185
commit
c33bd0123e
@ -1,3 +1,8 @@
|
||||
1999-07-13 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* elf/dl-runtime.c (fixup, profile_fixup): Call alloca to prevent
|
||||
inlining. Fixes PR libc/1198.
|
||||
|
||||
1999-07-14 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* Makerules (common-generated): Don't prepend $(common-objpfx).
|
||||
|
@ -57,6 +57,12 @@ fixup (
|
||||
void *const rel_addr = (void *)(l->l_addr + reloc->r_offset);
|
||||
ElfW(Addr) value;
|
||||
|
||||
/* The use of `alloca' here looks ridiculous but it helps. The goal is
|
||||
to prevent the function from being inlined and thus optimized out.
|
||||
There is no official way to do this so we use this trick. gcc never
|
||||
inlines functions which use `alloca'. */
|
||||
alloca (sizeof (int));
|
||||
|
||||
/* Sanity check that we're really looking at a PLT relocation. */
|
||||
assert (ELFW(R_TYPE)(reloc->r_info) == ELF_MACHINE_JMP_SLOT);
|
||||
|
||||
@ -110,6 +116,12 @@ profile_fixup (
|
||||
ElfW(Addr) *resultp;
|
||||
ElfW(Addr) value;
|
||||
|
||||
/* The use of `alloca' here looks ridiculous but it helps. The goal is
|
||||
to prevent the function from being inlined, and thus optimized out.
|
||||
There is no official way to do this so we use this trick. gcc never
|
||||
inlines functions which use `alloca'. */
|
||||
alloca (sizeof (int));
|
||||
|
||||
/* This is the address in the array where we store the result of previous
|
||||
relocations. */
|
||||
resultp = &l->l_reloc_result[reloc_offset / sizeof (PLTREL)];
|
||||
|
Loading…
Reference in New Issue
Block a user