summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2000-09-29 13:15:03 +0000
committerAlan Modra <amodra@bigpond.net.au>2000-09-29 13:15:03 +0000
commite39b78d9eee0aa3c3997ebf610cde92f466d680b (patch)
tree1a74b10d30c93a73c6cbf83b527f8bc1ff4c518b /bfd
parent47bedd7598f0ecaea4a910a49ea6bc1c124c9b22 (diff)
downloadgdb-e39b78d9eee0aa3c3997ebf610cde92f466d680b.tar.gz
* elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elflink.h16
2 files changed, 8 insertions, 12 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 1f81b532c2c..b454dc841b0 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
+
+ * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
+
2000-09-29 Momchil Velikov <velco@fadata.bg>
* elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
diff --git a/bfd/elflink.h b/bfd/elflink.h
index a808673d6ec..80c5b1c8fde 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)));