aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-09-29 13:15:03 +0000
committerAlan Modra <amodra@gmail.com>2000-09-29 13:15:03 +0000
commit512a2384fe00445101b67b9ac3b24600e01d504e (patch)
tree610ee928612472f5779eb0e83dde07124e0f6f0a /bfd/elflink.h
parent4de2d33d1b8c5f1c14d957aca252d83a0b74f5a3 (diff)
downloadfsf-binutils-gdb-512a2384fe00445101b67b9ac3b24600e01d504e.zip
fsf-binutils-gdb-512a2384fe00445101b67b9ac3b24600e01d504e.tar.gz
fsf-binutils-gdb-512a2384fe00445101b67b9ac3b24600e01d504e.tar.bz2
* elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index a808673..80c5b1c 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -1191,19 +1191,11 @@ elf_link_add_object_symbols (abfd, info)
char *fnm, *anm;
/* When we see DT_RPATH before DT_RUNPATH, we have
- to free runpath. */
+ to clear runpath. Do _NOT_ bfd_release, as that
+ frees all more recently bfd_alloc'd blocks as
+ well. */
if (rpath && elf_hash_table (info)->runpath)
- {
- struct bfd_link_needed_list *nn;
- for (n = elf_hash_table (info)->runpath;
- n != NULL; n = nn)
- {
- nn = n->next;
- bfd_release (abfd, n);
- }
- bfd_release (abfd, elf_hash_table (info)->runpath);
- elf_hash_table (info)->runpath = NULL;
- }
+ elf_hash_table (info)->runpath = NULL;
n = ((struct bfd_link_needed_list *)
bfd_alloc (abfd, sizeof (struct bfd_link_needed_list)));