* elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.

This commit is contained in:
Alan Modra
2000-09-29 13:15:03 +00:00
parent 4de2d33d1b
commit 512a2384fe
2 changed files with 8 additions and 12 deletions

View File

@ -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> 2000-09-29 Momchil Velikov <velco@fadata.bg>
* elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if

View File

@ -1191,19 +1191,11 @@ elf_link_add_object_symbols (abfd, info)
char *fnm, *anm; char *fnm, *anm;
/* When we see DT_RPATH before DT_RUNPATH, we have /* 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) if (rpath && elf_hash_table (info)->runpath)
{ elf_hash_table (info)->runpath = NULL;
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;
}
n = ((struct bfd_link_needed_list *) n = ((struct bfd_link_needed_list *)
bfd_alloc (abfd, sizeof (struct bfd_link_needed_list))); bfd_alloc (abfd, sizeof (struct bfd_link_needed_list)));