diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-05-07 00:00:48 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-05-07 00:00:48 +0000 |
commit | 7bcaca4384ad7234926730e9e2d90dae67d521bb (patch) | |
tree | 10781234adb41508ed57adb9956b5c6f9e0ac4a3 /elf/dl-close.c | |
parent | 607c351a149e23617e14c8fd583fcb4f4e9d2aeb (diff) | |
download | glibc-7bcaca4384ad7234926730e9e2d90dae67d521bb.tar glibc-7bcaca4384ad7234926730e9e2d90dae67d521bb.tar.gz glibc-7bcaca4384ad7234926730e9e2d90dae67d521bb.tar.bz2 glibc-7bcaca4384ad7234926730e9e2d90dae67d521bb.zip |
Update.
* elf/link.h (struct link_map): New field l_phdr_allocated.
* elf/dl-load.c (_dl_map_object_from_fd): Don't depend on having
the program header being part of any loaded segment. If it is not
allocate memory and set l_phdr_allocated flag.
* elf/dl-close.c (_dl_close): Free l_phdr if necessary.
Diffstat (limited to 'elf/dl-close.c')
-rw-r--r-- | elf/dl-close.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/elf/dl-close.c b/elf/dl-close.c index d7a61c4535..6846f83a8d 100644 --- a/elf/dl-close.c +++ b/elf/dl-close.c @@ -165,6 +165,9 @@ _dl_close (struct link_map *map) if (imap != map && imap->l_searchlist.r_list != NULL) free (imap->l_searchlist.r_list); + if (imap->l_phdr_allocated) + free (imap->l_phdr); + free (imap); } } |