aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-s390.c
diff options
context:
space:
mode:
authorAndreas Krebbel <Andreas.Krebbel@de.ibm.com>2012-03-30 13:35:33 +0000
committerAndreas Krebbel <Andreas.Krebbel@de.ibm.com>2012-03-30 13:35:33 +0000
commit00d8c7a9d48bf2c96ff8c511297d9bf488e081e9 (patch)
tree3c38b743492eb469e1b77e76bb1e4ddbc8922627 /bfd/elf64-s390.c
parent26a3ed35de9ac5839a6e36964652977ab4d04b42 (diff)
downloadgdb-00d8c7a9d48bf2c96ff8c511297d9bf488e081e9.zip
gdb-00d8c7a9d48bf2c96ff8c511297d9bf488e081e9.tar.gz
gdb-00d8c7a9d48bf2c96ff8c511297d9bf488e081e9.tar.bz2
2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* elf32-s390.c (struct elf_s390_dyn_relocs): Remove. Rename all occurrences in the file to elf_dyn_relocs. * elf64-s390.c: Likewise.
Diffstat (limited to 'bfd/elf64-s390.c')
-rw-r--r--bfd/elf64-s390.c49
1 files changed, 15 insertions, 34 deletions
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 15e1f7e..fc9b7a6 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -586,25 +586,6 @@ elf_s390_is_local_label_name (abfd, name)
#define PLT_FIRST_ENTRY_WORD6 (bfd_vma) 0x07f10700
#define PLT_FIRST_ENTRY_WORD7 (bfd_vma) 0x07000700
-/* The s390 linker needs to keep track of the number of relocs that it
- decides to copy as dynamic relocs in check_relocs for each symbol.
- This is so that it can later discard them if they are found to be
- unnecessary. We store the information in a field extending the
- regular ELF linker hash table. */
-
-struct elf_s390_dyn_relocs
-{
- struct elf_s390_dyn_relocs *next;
-
- /* The input section of the reloc. */
- asection *sec;
-
- /* Total number of relocs copied for the input section. */
- bfd_size_type count;
-
- /* Number of pc-relative relocs copied for the input section. */
- bfd_size_type pc_count;
-};
/* s390 ELF linker hash entry. */
@@ -613,7 +594,7 @@ struct elf_s390_link_hash_entry
struct elf_link_hash_entry elf;
/* Track dynamic relocs copied for this symbol. */
- struct elf_s390_dyn_relocs *dyn_relocs;
+ struct elf_dyn_relocs *dyn_relocs;
/* Number of GOTPLT references for a function. */
bfd_signed_vma gotplt_refcount;
@@ -835,14 +816,14 @@ elf_s390_copy_indirect_symbol (info, dir, ind)
{
if (edir->dyn_relocs != NULL)
{
- struct elf_s390_dyn_relocs **pp;
- struct elf_s390_dyn_relocs *p;
+ struct elf_dyn_relocs **pp;
+ struct elf_dyn_relocs *p;
/* Add reloc counts against the indirect sym to the direct sym
list. Merge any entries against the same section. */
for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
{
- struct elf_s390_dyn_relocs *q;
+ struct elf_dyn_relocs *q;
for (q = edir->dyn_relocs; q != NULL; q = q->next)
if (q->sec == p->sec)
@@ -1237,8 +1218,8 @@ elf_s390_check_relocs (bfd *abfd,
&& (h->root.type == bfd_link_hash_defweak
|| !h->def_regular)))
{
- struct elf_s390_dyn_relocs *p;
- struct elf_s390_dyn_relocs **head;
+ struct elf_dyn_relocs *p;
+ struct elf_dyn_relocs **head;
/* We must copy these reloc types into the output file.
Create a reloc section in dynobj and make room for
@@ -1280,14 +1261,14 @@ elf_s390_check_relocs (bfd *abfd,
s = sec;
vpp = &elf_section_data (s)->local_dynrel;
- head = (struct elf_s390_dyn_relocs **) vpp;
+ head = (struct elf_dyn_relocs **) vpp;
}
p = *head;
if (p == NULL || p->sec != sec)
{
bfd_size_type amt = sizeof *p;
- p = ((struct elf_s390_dyn_relocs *)
+ p = ((struct elf_dyn_relocs *)
bfd_alloc (htab->elf.dynobj, amt));
if (p == NULL)
return FALSE;
@@ -1391,8 +1372,8 @@ elf_s390_gc_sweep_hook (bfd *abfd,
if (r_symndx >= symtab_hdr->sh_info)
{
struct elf_s390_link_hash_entry *eh;
- struct elf_s390_dyn_relocs **pp;
- struct elf_s390_dyn_relocs *p;
+ struct elf_dyn_relocs **pp;
+ struct elf_dyn_relocs *p;
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
while (h->root.type == bfd_link_hash_indirect
@@ -1611,7 +1592,7 @@ elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info,
if (ELIMINATE_COPY_RELOCS)
{
struct elf_s390_link_hash_entry * eh;
- struct elf_s390_dyn_relocs *p;
+ struct elf_dyn_relocs *p;
eh = (struct elf_s390_link_hash_entry *) h;
for (p = eh->dyn_relocs; p != NULL; p = p->next)
@@ -1668,7 +1649,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h,
struct bfd_link_info *info;
struct elf_s390_link_hash_table *htab;
struct elf_s390_link_hash_entry *eh;
- struct elf_s390_dyn_relocs *p;
+ struct elf_dyn_relocs *p;
if (h->root.type == bfd_link_hash_indirect)
return TRUE;
@@ -1810,7 +1791,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h,
{
if (SYMBOL_CALLS_LOCAL (info, h))
{
- struct elf_s390_dyn_relocs **pp;
+ struct elf_dyn_relocs **pp;
for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
{
@@ -1892,7 +1873,7 @@ readonly_dynrelocs (h, inf)
PTR inf;
{
struct elf_s390_link_hash_entry *eh;
- struct elf_s390_dyn_relocs *p;
+ struct elf_dyn_relocs *p;
eh = (struct elf_s390_link_hash_entry *) h;
for (p = eh->dyn_relocs; p != NULL; p = p->next)
@@ -1961,7 +1942,7 @@ elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
for (s = ibfd->sections; s != NULL; s = s->next)
{
- struct elf_s390_dyn_relocs *p;
+ struct elf_dyn_relocs *p;
for (p = elf_section_data (s)->local_dynrel; p != NULL; p = p->next)
{