1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-01 10:06:57 +03:00

Fix flags parameter value passed to pltenter and pltexit

This commit is contained in:
Ulrich Drepper
2011-05-22 21:30:31 -04:00
parent 05bb4a68ad
commit de7ce8f171
2 changed files with 11 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2011-05-22 Ulrich Drepper <drepper@gmail.com>
* elf/dl-runtime.c (_dl_profile_fixup): Also store LA_SYMB_NOPLTENTER
and LA_SYMB_NOPLTEXIT in flags which are passed to pltenter and
pltexit.
2011-05-21 Ulrich Drepper <drepper@gmail.com> 2011-05-21 Ulrich Drepper <drepper@gmail.com>
* sysdeps/unix/sysv/linux/bits/time.h: Define CLOCK_REALTIME_ALARM * sysdeps/unix/sysv/linux/bits/time.h: Define CLOCK_REALTIME_ALARM

View File

@ -271,7 +271,7 @@ _dl_profile_fixup (
interested in auditing. */ interested in auditing. */
if ((l->l_audit_any_plt | result->l_audit_any_plt) != 0) if ((l->l_audit_any_plt | result->l_audit_any_plt) != 0)
{ {
unsigned int altvalue = 0; unsigned int flags = 0;
struct audit_ifaces *afct = GLRO(dl_audit); struct audit_ifaces *afct = GLRO(dl_audit);
/* Synthesize a symbol record where the st_value field is /* Synthesize a symbol record where the st_value field is
the result. */ the result. */
@ -294,7 +294,6 @@ _dl_profile_fixup (
if ((l->l_audit[cnt].bindflags & LA_FLG_BINDFROM) != 0 if ((l->l_audit[cnt].bindflags & LA_FLG_BINDFROM) != 0
&& (result->l_audit[cnt].bindflags & LA_FLG_BINDTO) != 0) && (result->l_audit[cnt].bindflags & LA_FLG_BINDTO) != 0)
{ {
unsigned int flags = altvalue;
if (afct->symbind != NULL) if (afct->symbind != NULL)
{ {
uintptr_t new_value uintptr_t new_value
@ -305,7 +304,7 @@ _dl_profile_fixup (
strtab2 + defsym->st_name); strtab2 + defsym->st_name);
if (new_value != (uintptr_t) sym.st_value) if (new_value != (uintptr_t) sym.st_value)
{ {
altvalue = LA_SYMB_ALTVALUE; flags |= LA_SYMB_ALTVALUE;
sym.st_value = new_value; sym.st_value = new_value;
} }
} }
@ -328,7 +327,7 @@ _dl_profile_fixup (
afct = afct->next; afct = afct->next;
} }
reloc_result->flags = altvalue; reloc_result->flags = flags;
value = DL_FIXUP_ADDR_VALUE (sym.st_value); value = DL_FIXUP_ADDR_VALUE (sym.st_value);
} }
else else
@ -366,7 +365,7 @@ _dl_profile_fixup (
const char *symname = strtab + sym.st_name; const char *symname = strtab + sym.st_name;
/* Keep track of overwritten addresses. */ /* Keep track of overwritten addresses. */
unsigned int altvalue = reloc_result->flags; unsigned int flags = reloc_result->flags;
struct audit_ifaces *afct = GLRO(dl_audit); struct audit_ifaces *afct = GLRO(dl_audit);
for (unsigned int cnt = 0; cnt < GLRO(dl_naudit); ++cnt) for (unsigned int cnt = 0; cnt < GLRO(dl_naudit); ++cnt)
@ -375,7 +374,6 @@ _dl_profile_fixup (
&& (reloc_result->enterexit && (reloc_result->enterexit
& (LA_SYMB_NOPLTENTER << (2 * (cnt + 1)))) == 0) & (LA_SYMB_NOPLTENTER << (2 * (cnt + 1)))) == 0)
{ {
unsigned int flags = altvalue;
long int new_framesize = -1; long int new_framesize = -1;
uintptr_t new_value uintptr_t new_value
= afct->ARCH_LA_PLTENTER (&sym, reloc_result->boundndx, = afct->ARCH_LA_PLTENTER (&sym, reloc_result->boundndx,
@ -385,7 +383,7 @@ _dl_profile_fixup (
&new_framesize); &new_framesize);
if (new_value != (uintptr_t) sym.st_value) if (new_value != (uintptr_t) sym.st_value)
{ {
altvalue = LA_SYMB_ALTVALUE; flags |= LA_SYMB_ALTVALUE;
sym.st_value = new_value; sym.st_value = new_value;
} }