aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-12-23 09:01:51 +0000
committerNick Clifton <nickc@redhat.com>2008-12-23 09:01:51 +0000
commit0f88be7a13937526f4789565a7dee988bf1369d5 (patch)
treedec9b5642bf6f5910809de144c2a28886f63dcf5 /bfd/elf32-i386.c
parent5995b57073ad5990e2f63c7f65c0a6c27cad55a9 (diff)
downloadgdb-0f88be7a13937526f4789565a7dee988bf1369d5.zip
gdb-0f88be7a13937526f4789565a7dee988bf1369d5.tar.gz
gdb-0f88be7a13937526f4789565a7dee988bf1369d5.tar.bz2
Remove STT_IFUNC support.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c51
1 files changed, 5 insertions, 46 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index ec0c16f..dda6e1f 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1193,26 +1193,6 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd,
return TRUE;
}
-/* Returns true if the hash entry refers to a symbol
- marked for indirect handling during reloc processing. */
-
-static bfd_boolean
-is_indirect_symbol (bfd * abfd, struct elf_link_hash_entry * h)
-{
- const struct elf_backend_data * bed;
-
- if (abfd == NULL || h == NULL)
- return FALSE;
-
- bed = get_elf_backend_data (abfd);
-
- return h->type == STT_IFUNC
- && bed != NULL
- && (bed->elf_osabi == ELFOSABI_LINUX
- /* GNU/Linux is still using the default value 0. */
- || bed->elf_osabi == ELFOSABI_NONE);
-}
-
/* Look through the relocs for a section during the first phase, and
calculate needed space in the global offset table, procedure linkage
table, and dynamic reloc sections. */
@@ -1472,8 +1452,7 @@ elf_i386_check_relocs (bfd *abfd,
&& (sec->flags & SEC_ALLOC) != 0
&& h != NULL
&& (h->root.type == bfd_link_hash_defweak
- || !h->def_regular))
- || is_indirect_symbol (abfd, h))
+ || !h->def_regular)))
{
struct elf_i386_dyn_relocs *p;
struct elf_i386_dyn_relocs **head;
@@ -1493,9 +1472,6 @@ elf_i386_check_relocs (bfd *abfd,
return FALSE;
}
- if (is_indirect_symbol (abfd, h))
- (void) _bfd_elf_make_ifunc_reloc_section (abfd, sec, htab->elf.dynobj, 2);
-
/* If this is a global symbol, we count the number of
relocations we need for this symbol. */
if (h != NULL)
@@ -2057,15 +2033,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
}
}
}
- else if (is_indirect_symbol (info->output_bfd, h))
- {
- if (h->dynindx == -1
- && !h->forced_local)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
- }
else if (ELIMINATE_COPY_RELOCS)
{
/* For the non-shared case, discard space for relocs against
@@ -2104,11 +2071,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
asection *sreloc;
- if (! info->shared
- && is_indirect_symbol (info->output_bfd, h))
- sreloc = elf_section_data (p->sec)->indirect_relocs;
- else
- sreloc = elf_section_data (p->sec)->sreloc;
+ sreloc = elf_section_data (p->sec)->sreloc;
BFD_ASSERT (sreloc != NULL);
sreloc->size += p->count * sizeof (Elf32_External_Rel);
@@ -2919,8 +2882,7 @@ elf_i386_relocate_section (bfd *output_bfd,
&& ((h->def_dynamic
&& !h->def_regular)
|| h->root.type == bfd_link_hash_undefweak
- || h->root.type == bfd_link_hash_undefined))
- || is_indirect_symbol (output_bfd, h))
+ || h->root.type == bfd_link_hash_undefined)))
{
Elf_Internal_Rela outrel;
bfd_byte *loc;
@@ -2960,10 +2922,7 @@ elf_i386_relocate_section (bfd *output_bfd,
outrel.r_info = ELF32_R_INFO (0, R_386_RELATIVE);
}
- if ((! info->shared) && is_indirect_symbol (output_bfd, h))
- sreloc = elf_section_data (input_section)->indirect_relocs;
- else
- sreloc = elf_section_data (input_section)->sreloc;
+ sreloc = elf_section_data (input_section)->sreloc;
BFD_ASSERT (sreloc != NULL && sreloc->contents != NULL);
@@ -2976,7 +2935,7 @@ elf_i386_relocate_section (bfd *output_bfd,
not want to fiddle with the addend. Otherwise, we
need to include the symbol value so that it becomes
an addend for the dynamic reloc. */
- if (! relocate || is_indirect_symbol (output_bfd, h))
+ if (! relocate)
continue;
}
break;