summaryrefslogtreecommitdiffstats
path: root/libelf/elf32_updatenull.c
diff options
context:
space:
mode:
authorUlrich Drepper <[email protected]>2008-08-16 03:09:13 +0000
committerUlrich Drepper <[email protected]>2008-08-16 03:09:13 +0000
commitd56e232fb8f8cd97a336ed612c89145ec121f785 (patch)
tree5bd8fe5f1f73bb258eecd2cd4dae5c30a33a016e /libelf/elf32_updatenull.c
parent1d8bb25cac06b5af57f8733e5ea7a068a79edfe0 (diff)
propagate from branch 'com.redhat.elfutils.pmachata.threads' (head 8bd3bc10eb015c96f7bafcc6a22c973620b57dd8)
to branch 'com.redhat.elfutils' (head c5a11b6b3329382f1b5ffd0020f0d93c64176f20)
Diffstat (limited to 'libelf/elf32_updatenull.c')
-rw-r--r--libelf/elf32_updatenull.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c
index b3299fe4..dd50fb29 100644
--- a/libelf/elf32_updatenull.c
+++ b/libelf/elf32_updatenull.c
@@ -133,12 +133,15 @@ ELFW(default_ehdr,LIBELFBITS) (Elf *elf, ElfW2(LIBELFBITS,Ehdr) *ehdr,
off_t
internal_function
-__elfw2(LIBELFBITS,updatenull) (Elf *elf, int *change_bop, size_t shnum)
+__elfw2(LIBELFBITS,updatenull) (Elf *elf, int *change_bop,
+ size_t shnum, lockstat_t locked)
{
- ElfW2(LIBELFBITS,Ehdr) *ehdr = INTUSE(elfw2(LIBELFBITS,getehdr)) (elf);
+ ElfW2(LIBELFBITS,Ehdr) *ehdr;
int changed = 0;
int ehdr_flags = 0;
+ ehdr = __elfw2(LIBELFBITS,getehdr_internal) (elf, locked);
+
/* Set the default values. */
if (ELFW(default_ehdr,LIBELFBITS) (elf, ehdr, shnum, change_bop) != 0)
return -1;
@@ -150,7 +153,7 @@ __elfw2(LIBELFBITS,updatenull) (Elf *elf, int *change_bop, size_t shnum)
if (elf->state.ELFW(elf,LIBELFBITS).phdr == NULL
&& (ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN
|| ehdr->e_type == ET_CORE))
- (void) INTUSE(elfw2(LIBELFBITS,getphdr)) (elf);
+ (void) __elfw2(LIBELFBITS,getphdr_internal) (elf, locked);
if (elf->state.ELFW(elf,LIBELFBITS).phdr != NULL)
{
/* Only executables, shared objects, and core files have a program
@@ -204,7 +207,7 @@ __elfw2(LIBELFBITS,updatenull) (Elf *elf, int *change_bop, size_t shnum)
/* Load the section headers if necessary. This loads the
headers for all sections. */
if (list->data[1].shdr.ELFW(e,LIBELFBITS) == NULL)
- (void) INTUSE(elfw2(LIBELFBITS,getshdr)) (&list->data[1]);
+ (void) __elfw2(LIBELFBITS,getshdr_internal) (&list->data[1], locked);
do
{
@@ -265,7 +268,8 @@ __elfw2(LIBELFBITS,updatenull) (Elf *elf, int *change_bop, size_t shnum)
update_if_changed (shdr->sh_entsize, sh_entsize,
scn->shdr_flags);
- if (scn->data_read == 0 && __libelf_set_rawdata (scn) != 0)
+ if (scn->data_read == 0
+ && __libelf_set_rawdata (scn, locked) != 0)
/* Something went wrong. The error value is already set. */
return -1;
@@ -364,7 +368,7 @@ __elfw2(LIBELFBITS,updatenull) (Elf *elf, int *change_bop, size_t shnum)
{
/* The position of the section in the file
changed. Create the section data list. */
- if (INTUSE(elf_getdata) (scn, NULL) == NULL)
+ if (__elf_getdata_internal (scn, NULL, locked) == NULL)
return -1;
}