summaryrefslogtreecommitdiffstats
path: root/contrib/binutils
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-04-12 19:50:32 +0000
committerobrien <obrien@FreeBSD.org>2002-04-12 19:50:32 +0000
commitf42de708c0a49777a80661f01ffe84730d67de53 (patch)
tree94b5dd836aed0a22a9e4787dd1730b8b50332130 /contrib/binutils
parent0efa280d1b7cf8db83295fe0c452681ae1422561 (diff)
downloadFreeBSD-src-f42de708c0a49777a80661f01ffe84730d67de53.zip
FreeBSD-src-f42de708c0a49777a80661f01ffe84730d67de53.tar.gz
Merge rev 1.8 ("ELF_DYNAMIC_INTERPRETER") into Binutils 2.12_20020410 snap.
Diffstat (limited to 'contrib/binutils')
-rw-r--r--contrib/binutils/bfd/elf32-i386.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/contrib/binutils/bfd/elf32-i386.c b/contrib/binutils/bfd/elf32-i386.c
index 2f9f9ea..13ac62e 100644
--- a/contrib/binutils/bfd/elf32-i386.c
+++ b/contrib/binutils/bfd/elf32-i386.c
@@ -1,5 +1,5 @@
/* Intel 80386/80486-specific support for 32-bit ELF
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -853,11 +853,10 @@ elf_i386_check_relocs (abfd, info, sec, relocs)
{
const char *name;
bfd *dynobj;
+ unsigned int strndx = elf_elfheader (abfd)->e_shstrndx;
+ unsigned int shnam = elf_section_data (sec)->rel_hdr.sh_name;
- name = (bfd_elf_string_from_elf_section
- (abfd,
- elf_elfheader (abfd)->e_shstrndx,
- elf_section_data (sec)->rel_hdr.sh_name));
+ name = bfd_elf_string_from_elf_section (abfd, strndx, shnam);
if (name == NULL)
return false;
@@ -1257,10 +1256,15 @@ allocate_dynrelocs (h, inf)
struct elf_i386_link_hash_entry *eh;
struct elf_i386_dyn_relocs *p;
- if (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
+ if (h->root.type == bfd_link_hash_indirect)
return true;
+ if (h->root.type == bfd_link_hash_warning)
+ /* When warning symbols are created, they **replace** the "real"
+ entry in the hash table, thus we never get to see the real
+ symbol in a hash traversal. So look at it now. */
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
info = (struct bfd_link_info *) inf;
htab = elf_i386_hash_table (info);
@@ -1427,6 +1431,9 @@ readonly_dynrelocs (h, inf)
struct elf_i386_link_hash_entry *eh;
struct elf_i386_dyn_relocs *p;
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
eh = (struct elf_i386_link_hash_entry *) h;
for (p = eh->dyn_relocs; p != NULL; p = p->next)
{
OpenPOWER on IntegriCloud