|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf-bfd.h binutils-2.35/bfd/elf-bfd.h
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf-bfd.h 2020-07-30 15:04:05.366466702 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf-bfd.h 2020-07-30 15:04:16.707393960 +0100
|
|
|
cb7fb9 |
@@ -549,6 +549,16 @@ enum elf_target_os
|
|
|
cb7fb9 |
is_nacl /* Native Client. */
|
|
|
cb7fb9 |
};
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
+/* Used by bfd_sym_from_r_symndx to cache a small number of local
|
|
|
cb7fb9 |
+ symbols. */
|
|
|
cb7fb9 |
+#define LOCAL_SYM_CACHE_SIZE 32
|
|
|
cb7fb9 |
+struct sym_cache
|
|
|
cb7fb9 |
+{
|
|
|
cb7fb9 |
+ bfd *abfd;
|
|
|
cb7fb9 |
+ unsigned long indx[LOCAL_SYM_CACHE_SIZE];
|
|
|
cb7fb9 |
+ Elf_Internal_Sym sym[LOCAL_SYM_CACHE_SIZE];
|
|
|
cb7fb9 |
+};
|
|
|
cb7fb9 |
+
|
|
|
cb7fb9 |
/* ELF linker hash table. */
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
struct elf_link_hash_table
|
|
|
cb7fb9 |
@@ -676,6 +686,9 @@ struct elf_link_hash_table
|
|
|
cb7fb9 |
/* A linked list of dynamic BFD's loaded in the link. */
|
|
|
cb7fb9 |
struct elf_link_loaded_list *dyn_loaded;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
+ /* Small local sym cache. */
|
|
|
cb7fb9 |
+ struct sym_cache sym_cache;
|
|
|
cb7fb9 |
+
|
|
|
cb7fb9 |
/* Short-cuts to get to dynamic linker sections. */
|
|
|
cb7fb9 |
asection *sgot;
|
|
|
cb7fb9 |
asection *sgotplt;
|
|
|
cb7fb9 |
@@ -717,16 +730,6 @@ struct elf_link_hash_table
|
|
|
cb7fb9 |
/* Returns TRUE if the hash table is a struct elf_link_hash_table. */
|
|
|
cb7fb9 |
#define is_elf_hash_table(htab) \
|
|
|
cb7fb9 |
(((struct bfd_link_hash_table *) (htab))->type == bfd_link_elf_hash_table)
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
-/* Used by bfd_sym_from_r_symndx to cache a small number of local
|
|
|
cb7fb9 |
- symbols. */
|
|
|
cb7fb9 |
-#define LOCAL_SYM_CACHE_SIZE 32
|
|
|
cb7fb9 |
-struct sym_cache
|
|
|
cb7fb9 |
-{
|
|
|
cb7fb9 |
- bfd *abfd;
|
|
|
cb7fb9 |
- unsigned long indx[LOCAL_SYM_CACHE_SIZE];
|
|
|
cb7fb9 |
- Elf_Internal_Sym sym[LOCAL_SYM_CACHE_SIZE];
|
|
|
cb7fb9 |
-};
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Constant information held for an ELF backend. */
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-arm.c binutils-2.35/bfd/elf32-arm.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-arm.c 2020-07-30 15:04:05.376466638 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-arm.c 2020-07-30 15:04:16.708393953 +0100
|
|
|
cb7fb9 |
@@ -3390,9 +3390,6 @@ struct elf32_arm_link_hash_table
|
|
|
cb7fb9 |
bfd_vma offset;
|
|
|
cb7fb9 |
} tls_ldm_got;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* For convenience in allocate_dynrelocs. */
|
|
|
cb7fb9 |
bfd * obfd;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
@@ -15316,7 +15313,7 @@ elf32_arm_check_relocs (bfd *abfd, struc
|
|
|
cb7fb9 |
if (r_symndx < symtab_hdr->sh_info)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* A local symbol. */
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -16871,7 +16868,8 @@ elf32_arm_size_dynamic_sections (bfd * o
|
|
|
cb7fb9 |
s->size += 4;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ibfd, symndx);
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, ibfd,
|
|
|
cb7fb9 |
+ symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-bfin.c binutils-2.35/bfd/elf32-bfin.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-bfin.c 2020-07-30 15:04:05.377466632 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-bfin.c 2020-07-30 15:04:16.709393947 +0100
|
|
|
cb7fb9 |
@@ -4791,16 +4791,6 @@ struct bfin_link_hash_entry
|
|
|
cb7fb9 |
struct bfin_pcrel_relocs_copied *pcrel_relocs_copied;
|
|
|
cb7fb9 |
};
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
-/* bfin ELF linker hash table. */
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
-struct bfin_link_hash_table
|
|
|
cb7fb9 |
-{
|
|
|
cb7fb9 |
- struct elf_link_hash_table root;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-};
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
#define bfin_hash_entry(ent) ((struct bfin_link_hash_entry *) (ent))
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
static struct bfd_hash_entry *
|
|
|
cb7fb9 |
@@ -4829,15 +4819,14 @@ bfin_link_hash_newfunc (struct bfd_hash_
|
|
|
cb7fb9 |
static struct bfd_link_hash_table *
|
|
|
cb7fb9 |
bfin_link_hash_table_create (bfd * abfd)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- struct bfin_link_hash_table *ret;
|
|
|
cb7fb9 |
- size_t amt = sizeof (struct bfin_link_hash_table);
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *ret;
|
|
|
cb7fb9 |
+ size_t amt = sizeof (struct elf_link_hash_table);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
ret = bfd_zmalloc (amt);
|
|
|
cb7fb9 |
if (ret == NULL)
|
|
|
cb7fb9 |
return NULL;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
|
|
|
cb7fb9 |
- bfin_link_hash_newfunc,
|
|
|
cb7fb9 |
+ if (!_bfd_elf_link_hash_table_init (ret, abfd, bfin_link_hash_newfunc,
|
|
|
cb7fb9 |
sizeof (struct elf_link_hash_entry),
|
|
|
cb7fb9 |
BFIN_ELF_DATA))
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
@@ -4845,9 +4834,7 @@ bfin_link_hash_table_create (bfd * abfd)
|
|
|
cb7fb9 |
return NULL;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- ret->sym_cache.abfd = NULL;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
- return &ret->root.root;
|
|
|
cb7fb9 |
+ return &ret->root;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* The size in bytes of an entry in the procedure linkage table. */
|
|
|
cb7fb9 |
@@ -5418,10 +5405,6 @@ struct bfd_elf_special_section const elf
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
#define bfd_elf32_bfd_is_local_label_name \
|
|
|
cb7fb9 |
bfin_is_local_label_name
|
|
|
cb7fb9 |
-#define bfin_hash_table(p) \
|
|
|
cb7fb9 |
- ((struct bfin_link_hash_table *) (p)->hash)
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
#define elf_backend_create_dynamic_sections \
|
|
|
cb7fb9 |
_bfd_elf_create_dynamic_sections
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-csky.c binutils-2.35/bfd/elf32-csky.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-csky.c 2020-07-30 15:04:05.378466625 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-csky.c 2020-07-30 15:04:16.709393947 +0100
|
|
|
cb7fb9 |
@@ -1208,9 +1208,6 @@ struct csky_elf_link_hash_table
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
struct elf_link_hash_table elf;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* Data for R_CKCORE_TLS_LDM32 relocations. */
|
|
|
cb7fb9 |
union
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
@@ -2477,7 +2474,7 @@ csky_elf_check_relocs (bfd * abfd,
|
|
|
cb7fb9 |
if (r_symndx < symtab_hdr->sh_info)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* A local symbol. */
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -2584,7 +2581,7 @@ csky_elf_check_relocs (bfd * abfd,
|
|
|
cb7fb9 |
asection *s;
|
|
|
cb7fb9 |
Elf_Internal_Sym *loc_isym;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- loc_isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ loc_isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (loc_isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-hppa.c binutils-2.35/bfd/elf32-hppa.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-hppa.c 2020-07-30 15:04:05.368466689 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-hppa.c 2020-07-30 15:04:16.709393947 +0100
|
|
|
cb7fb9 |
@@ -286,9 +286,6 @@ struct elf32_hppa_link_hash_table
|
|
|
cb7fb9 |
/* Set if we need a .plt stub to support lazy dynamic linking. */
|
|
|
cb7fb9 |
unsigned int need_plt_stub:1;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* Data for LDM relocations. */
|
|
|
cb7fb9 |
union
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
@@ -1465,7 +1462,7 @@ elf32_hppa_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
void *vpp;
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->etab.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -4038,7 +4035,7 @@ elf32_hppa_relocate_section (bfd *output
|
|
|
cb7fb9 |
else
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym
|
|
|
cb7fb9 |
- = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ = bfd_sym_from_r_symndx (&htab->etab.sym_cache,
|
|
|
cb7fb9 |
input_bfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-i386.c binutils-2.35/bfd/elf32-i386.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-i386.c 2020-07-30 15:04:05.380466612 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-i386.c 2020-07-30 15:04:16.710393941 +0100
|
|
|
cb7fb9 |
@@ -1158,7 +1158,7 @@ elf_i386_tls_transition (struct bfd_link
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
name = bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL);
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
@@ -1251,7 +1251,7 @@ elf_i386_convert_load_reloc (bfd *abfd,
|
|
|
cb7fb9 |
else
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
local_ref = TRUE;
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache, abfd,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd,
|
|
|
cb7fb9 |
r_symndx);
|
|
|
cb7fb9 |
abs_symbol = isym->st_shndx == SHN_ABS;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
@@ -1529,7 +1529,7 @@ elf_i386_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
if (r_symndx < symtab_hdr->sh_info)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* A local symbol. */
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
goto error_return;
|
|
|
cb7fb9 |
@@ -1859,7 +1859,7 @@ elf_i386_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
void **vpp;
|
|
|
cb7fb9 |
asection *s;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
goto error_return;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-m32r.c binutils-2.35/bfd/elf32-m32r.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-m32r.c 2020-07-30 15:04:05.370466676 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-m32r.c 2020-07-30 15:04:16.710393941 +0100
|
|
|
cb7fb9 |
@@ -1498,20 +1498,6 @@ struct elf_m32r_pcrel_relocs_copied
|
|
|
cb7fb9 |
bfd_size_type count;
|
|
|
cb7fb9 |
};
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
-/* m32r ELF linker hash table. */
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
-struct elf_m32r_link_hash_table
|
|
|
cb7fb9 |
-{
|
|
|
cb7fb9 |
- struct elf_link_hash_table root;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
- /* Short-cuts to get to dynamic linker sections. */
|
|
|
cb7fb9 |
- asection *sdynbss;
|
|
|
cb7fb9 |
- asection *srelbss;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-};
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* Traverse an m32r ELF linker hash table. */
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
#define m32r_elf_link_hash_traverse(table, func, info) \
|
|
|
cb7fb9 |
@@ -1524,21 +1510,21 @@ struct elf_m32r_link_hash_table
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
#define m32r_elf_hash_table(p) \
|
|
|
cb7fb9 |
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
|
|
|
cb7fb9 |
- == M32R_ELF_DATA ? ((struct elf_m32r_link_hash_table *) ((p)->hash)) : NULL)
|
|
|
cb7fb9 |
+ == M32R_ELF_DATA ? ((struct elf_link_hash_table *) ((p)->hash)) : NULL)
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Create an m32r ELF linker hash table. */
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
static struct bfd_link_hash_table *
|
|
|
cb7fb9 |
m32r_elf_link_hash_table_create (bfd *abfd)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- struct elf_m32r_link_hash_table *ret;
|
|
|
cb7fb9 |
- size_t amt = sizeof (struct elf_m32r_link_hash_table);
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *ret;
|
|
|
cb7fb9 |
+ size_t amt = sizeof (struct elf_link_hash_table);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
ret = bfd_zmalloc (amt);
|
|
|
cb7fb9 |
if (ret == NULL)
|
|
|
cb7fb9 |
return NULL;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
|
|
|
cb7fb9 |
+ if (!_bfd_elf_link_hash_table_init (ret, abfd,
|
|
|
cb7fb9 |
_bfd_elf_link_hash_newfunc,
|
|
|
cb7fb9 |
sizeof (struct elf_link_hash_entry),
|
|
|
cb7fb9 |
M32R_ELF_DATA))
|
|
|
cb7fb9 |
@@ -1547,7 +1533,7 @@ m32r_elf_link_hash_table_create (bfd *ab
|
|
|
cb7fb9 |
return NULL;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- return &ret->root.root;
|
|
|
cb7fb9 |
+ return &ret->root;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Create dynamic sections when linking against a dynamic object. */
|
|
|
cb7fb9 |
@@ -1555,7 +1541,7 @@ m32r_elf_link_hash_table_create (bfd *ab
|
|
|
cb7fb9 |
static bfd_boolean
|
|
|
cb7fb9 |
m32r_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- struct elf_m32r_link_hash_table *htab;
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab;
|
|
|
cb7fb9 |
flagword flags, pltflags;
|
|
|
cb7fb9 |
asection *s;
|
|
|
cb7fb9 |
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
|
|
|
cb7fb9 |
@@ -1578,7 +1564,7 @@ m32r_elf_create_dynamic_sections (bfd *a
|
|
|
cb7fb9 |
pltflags |= SEC_READONLY;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
s = bfd_make_section_anyway_with_flags (abfd, ".plt", pltflags);
|
|
|
cb7fb9 |
- htab->root.splt = s;
|
|
|
cb7fb9 |
+ htab->splt = s;
|
|
|
cb7fb9 |
if (s == NULL
|
|
|
cb7fb9 |
|| !bfd_set_section_alignment (s, bed->plt_alignment))
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -1598,7 +1584,7 @@ m32r_elf_create_dynamic_sections (bfd *a
|
|
|
cb7fb9 |
h = (struct elf_link_hash_entry *) bh;
|
|
|
cb7fb9 |
h->def_regular = 1;
|
|
|
cb7fb9 |
h->type = STT_OBJECT;
|
|
|
cb7fb9 |
- htab->root.hplt = h;
|
|
|
cb7fb9 |
+ htab->hplt = h;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (bfd_link_pic (info)
|
|
|
cb7fb9 |
&& ! bfd_elf_link_record_dynamic_symbol (info, h))
|
|
|
cb7fb9 |
@@ -1609,12 +1595,12 @@ m32r_elf_create_dynamic_sections (bfd *a
|
|
|
cb7fb9 |
bed->default_use_rela_p
|
|
|
cb7fb9 |
? ".rela.plt" : ".rel.plt",
|
|
|
cb7fb9 |
flags | SEC_READONLY);
|
|
|
cb7fb9 |
- htab->root.srelplt = s;
|
|
|
cb7fb9 |
+ htab->srelplt = s;
|
|
|
cb7fb9 |
if (s == NULL
|
|
|
cb7fb9 |
|| !bfd_set_section_alignment (s, ptralign))
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (htab->root.sgot == NULL
|
|
|
cb7fb9 |
+ if (htab->sgot == NULL
|
|
|
cb7fb9 |
&& !_bfd_elf_create_got_section (abfd, info))
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
@@ -1669,7 +1655,7 @@ static bfd_boolean
|
|
|
cb7fb9 |
m32r_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
|
|
|
cb7fb9 |
struct elf_link_hash_entry *h)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- struct elf_m32r_link_hash_table *htab;
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab;
|
|
|
cb7fb9 |
bfd *dynobj;
|
|
|
cb7fb9 |
asection *s;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
@@ -1796,7 +1782,7 @@ static bfd_boolean
|
|
|
cb7fb9 |
allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
struct bfd_link_info *info;
|
|
|
cb7fb9 |
- struct elf_m32r_link_hash_table *htab;
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab;
|
|
|
cb7fb9 |
struct elf_dyn_relocs *p;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (h->root.type == bfd_link_hash_indirect)
|
|
|
cb7fb9 |
@@ -1807,7 +1793,7 @@ allocate_dynrelocs (struct elf_link_hash
|
|
|
cb7fb9 |
if (htab == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (htab->root.dynamic_sections_created
|
|
|
cb7fb9 |
+ if (htab->dynamic_sections_created
|
|
|
cb7fb9 |
&& h->plt.refcount > 0)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* Make sure this symbol is output as a dynamic symbol.
|
|
|
cb7fb9 |
@@ -1821,7 +1807,7 @@ allocate_dynrelocs (struct elf_link_hash
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h))
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- asection *s = htab->root.splt;
|
|
|
cb7fb9 |
+ asection *s = htab->splt;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* If this is the first .plt entry, make room for the special
|
|
|
cb7fb9 |
first entry. */
|
|
|
cb7fb9 |
@@ -1847,10 +1833,10 @@ allocate_dynrelocs (struct elf_link_hash
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* We also need to make an entry in the .got.plt section, which
|
|
|
cb7fb9 |
will be placed in the .got section by the linker script. */
|
|
|
cb7fb9 |
- htab->root.sgotplt->size += 4;
|
|
|
cb7fb9 |
+ htab->sgotplt->size += 4;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* We also need to make an entry in the .rel.plt section. */
|
|
|
cb7fb9 |
- htab->root.srelplt->size += sizeof (Elf32_External_Rela);
|
|
|
cb7fb9 |
+ htab->srelplt->size += sizeof (Elf32_External_Rela);
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
else
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
@@ -1878,13 +1864,13 @@ allocate_dynrelocs (struct elf_link_hash
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- s = htab->root.sgot;
|
|
|
cb7fb9 |
+ s = htab->sgot;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
h->got.offset = s->size;
|
|
|
cb7fb9 |
s->size += 4;
|
|
|
cb7fb9 |
- dyn = htab->root.dynamic_sections_created;
|
|
|
cb7fb9 |
+ dyn = htab->dynamic_sections_created;
|
|
|
cb7fb9 |
if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h))
|
|
|
cb7fb9 |
- htab->root.srelgot->size += sizeof (Elf32_External_Rela);
|
|
|
cb7fb9 |
+ htab->srelgot->size += sizeof (Elf32_External_Rela);
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
else
|
|
|
cb7fb9 |
h->got.offset = (bfd_vma) -1;
|
|
|
cb7fb9 |
@@ -1944,7 +1930,7 @@ allocate_dynrelocs (struct elf_link_hash
|
|
|
cb7fb9 |
if (!h->non_got_ref
|
|
|
cb7fb9 |
&& ((h->def_dynamic
|
|
|
cb7fb9 |
&& !h->def_regular)
|
|
|
cb7fb9 |
- || (htab->root.dynamic_sections_created
|
|
|
cb7fb9 |
+ || (htab->dynamic_sections_created
|
|
|
cb7fb9 |
&& (h->root.type == bfd_link_hash_undefweak
|
|
|
cb7fb9 |
|| h->root.type == bfd_link_hash_undefined))))
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
@@ -1984,7 +1970,7 @@ static bfd_boolean
|
|
|
cb7fb9 |
m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
|
|
|
cb7fb9 |
struct bfd_link_info *info)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- struct elf_m32r_link_hash_table *htab;
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab;
|
|
|
cb7fb9 |
bfd *dynobj;
|
|
|
cb7fb9 |
asection *s;
|
|
|
cb7fb9 |
bfd_boolean relocs;
|
|
|
cb7fb9 |
@@ -1998,10 +1984,10 @@ m32r_elf_size_dynamic_sections (bfd *out
|
|
|
cb7fb9 |
if (htab == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- dynobj = htab->root.dynobj;
|
|
|
cb7fb9 |
+ dynobj = htab->dynobj;
|
|
|
cb7fb9 |
BFD_ASSERT (dynobj != NULL);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (htab->root.dynamic_sections_created)
|
|
|
cb7fb9 |
+ if (htab->dynamic_sections_created)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* Set the contents of the .interp section to the interpreter. */
|
|
|
cb7fb9 |
if (bfd_link_executable (info) && !info->nointerp)
|
|
|
cb7fb9 |
@@ -2060,8 +2046,8 @@ m32r_elf_size_dynamic_sections (bfd *out
|
|
|
cb7fb9 |
symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
|
|
|
cb7fb9 |
locsymcount = symtab_hdr->sh_info;
|
|
|
cb7fb9 |
end_local_got = local_got + locsymcount;
|
|
|
cb7fb9 |
- s = htab->root.sgot;
|
|
|
cb7fb9 |
- srel = htab->root.srelgot;
|
|
|
cb7fb9 |
+ s = htab->sgot;
|
|
|
cb7fb9 |
+ srel = htab->srelgot;
|
|
|
cb7fb9 |
for (; local_got < end_local_got; ++local_got)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
if (*local_got > 0)
|
|
|
cb7fb9 |
@@ -2078,7 +2064,7 @@ m32r_elf_size_dynamic_sections (bfd *out
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Allocate global sym .plt and .got entries, and space for global
|
|
|
cb7fb9 |
sym dynamic relocs. */
|
|
|
cb7fb9 |
- elf_link_hash_traverse (&htab->root, allocate_dynrelocs, info);
|
|
|
cb7fb9 |
+ elf_link_hash_traverse (htab, allocate_dynrelocs, info);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* We now have determined the sizes of the various dynamic sections.
|
|
|
cb7fb9 |
Allocate memory for them. */
|
|
|
cb7fb9 |
@@ -2088,9 +2074,9 @@ m32r_elf_size_dynamic_sections (bfd *out
|
|
|
cb7fb9 |
if ((s->flags & SEC_LINKER_CREATED) == 0)
|
|
|
cb7fb9 |
continue;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (s == htab->root.splt
|
|
|
cb7fb9 |
- || s == htab->root.sgot
|
|
|
cb7fb9 |
- || s == htab->root.sgotplt
|
|
|
cb7fb9 |
+ if (s == htab->splt
|
|
|
cb7fb9 |
+ || s == htab->sgot
|
|
|
cb7fb9 |
+ || s == htab->sgotplt
|
|
|
cb7fb9 |
|| s == htab->sdynbss)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* Strip this section if we don't need it; see the
|
|
|
cb7fb9 |
@@ -2098,7 +2084,7 @@ m32r_elf_size_dynamic_sections (bfd *out
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
else if (CONST_STRNEQ (bfd_section_name (s), ".rela"))
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- if (s->size != 0 && s != htab->root.srelplt)
|
|
|
cb7fb9 |
+ if (s->size != 0 && s != htab->srelplt)
|
|
|
cb7fb9 |
relocs = TRUE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* We use the reloc_count field as a counter if we need
|
|
|
cb7fb9 |
@@ -2188,7 +2174,7 @@ m32r_elf_relocate_section (bfd *output_b
|
|
|
cb7fb9 |
Elf_Internal_Rela *rel, *relend;
|
|
|
cb7fb9 |
/* Assume success. */
|
|
|
cb7fb9 |
bfd_boolean ret = TRUE;
|
|
|
cb7fb9 |
- struct elf_m32r_link_hash_table *htab = m32r_elf_hash_table (info);
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab = m32r_elf_hash_table (info);
|
|
|
cb7fb9 |
bfd_vma *local_got_offsets;
|
|
|
cb7fb9 |
asection *sgot, *splt, *sreloc;
|
|
|
cb7fb9 |
bfd_vma high_address = bfd_get_section_limit (input_bfd, input_section);
|
|
|
cb7fb9 |
@@ -2198,8 +2184,8 @@ m32r_elf_relocate_section (bfd *output_b
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
local_got_offsets = elf_local_got_offsets (input_bfd);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- sgot = htab->root.sgot;
|
|
|
cb7fb9 |
- splt = htab->root.splt;
|
|
|
cb7fb9 |
+ sgot = htab->sgot;
|
|
|
cb7fb9 |
+ splt = htab->splt;
|
|
|
cb7fb9 |
sreloc = NULL;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
rel = relocs;
|
|
|
cb7fb9 |
@@ -2295,7 +2281,7 @@ m32r_elf_relocate_section (bfd *output_b
|
|
|
cb7fb9 |
bfd_boolean dyn;
|
|
|
cb7fb9 |
sec = h->root.u.def.section;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- dyn = htab->root.dynamic_sections_created;
|
|
|
cb7fb9 |
+ dyn = htab->dynamic_sections_created;
|
|
|
cb7fb9 |
sec = h->root.u.def.section;
|
|
|
cb7fb9 |
if (r_type == R_M32R_GOTPC24
|
|
|
cb7fb9 |
|| (r_type == R_M32R_GOTPC_HI_ULO
|
|
|
cb7fb9 |
@@ -2516,7 +2502,7 @@ m32r_elf_relocate_section (bfd *output_b
|
|
|
cb7fb9 |
off = h->got.offset;
|
|
|
cb7fb9 |
BFD_ASSERT (off != (bfd_vma) -1);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- dyn = htab->root.dynamic_sections_created;
|
|
|
cb7fb9 |
+ dyn = htab->dynamic_sections_created;
|
|
|
cb7fb9 |
if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
|
|
|
cb7fb9 |
bfd_link_pic (info),
|
|
|
cb7fb9 |
h)
|
|
|
cb7fb9 |
@@ -2576,7 +2562,7 @@ m32r_elf_relocate_section (bfd *output_b
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* We need to generate a R_M32R_RELATIVE reloc
|
|
|
cb7fb9 |
for the dynamic linker. */
|
|
|
cb7fb9 |
- srelgot = htab->root.srelgot;
|
|
|
cb7fb9 |
+ srelgot = htab->srelgot;
|
|
|
cb7fb9 |
BFD_ASSERT (srelgot != NULL);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
outrel.r_offset = (sgot->output_section->vma
|
|
|
cb7fb9 |
@@ -2892,7 +2878,7 @@ m32r_elf_finish_dynamic_symbol (bfd *out
|
|
|
cb7fb9 |
struct elf_link_hash_entry *h,
|
|
|
cb7fb9 |
Elf_Internal_Sym *sym)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- struct elf_m32r_link_hash_table *htab;
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab;
|
|
|
cb7fb9 |
bfd_byte *loc;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
#ifdef DEBUG_PIC
|
|
|
cb7fb9 |
@@ -2918,9 +2904,9 @@ m32r_elf_finish_dynamic_symbol (bfd *out
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
BFD_ASSERT (h->dynindx != -1);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- splt = htab->root.splt;
|
|
|
cb7fb9 |
- sgot = htab->root.sgotplt;
|
|
|
cb7fb9 |
- srela = htab->root.srelplt;
|
|
|
cb7fb9 |
+ splt = htab->splt;
|
|
|
cb7fb9 |
+ sgot = htab->sgotplt;
|
|
|
cb7fb9 |
+ srela = htab->srelplt;
|
|
|
cb7fb9 |
BFD_ASSERT (splt != NULL && sgot != NULL && srela != NULL);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Get the index in the procedure linkage table which
|
|
|
cb7fb9 |
@@ -3014,8 +3000,8 @@ m32r_elf_finish_dynamic_symbol (bfd *out
|
|
|
cb7fb9 |
/* This symbol has an entry in the global offset table. Set it
|
|
|
cb7fb9 |
up. */
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- sgot = htab->root.sgot;
|
|
|
cb7fb9 |
- srela = htab->root.srelgot;
|
|
|
cb7fb9 |
+ sgot = htab->sgot;
|
|
|
cb7fb9 |
+ srela = htab->srelgot;
|
|
|
cb7fb9 |
BFD_ASSERT (sgot != NULL && srela != NULL);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
rela.r_offset = (sgot->output_section->vma
|
|
|
cb7fb9 |
@@ -3063,7 +3049,7 @@ m32r_elf_finish_dynamic_symbol (bfd *out
|
|
|
cb7fb9 |
&& (h->root.type == bfd_link_hash_defined
|
|
|
cb7fb9 |
|| h->root.type == bfd_link_hash_defweak));
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- s = bfd_get_linker_section (htab->root.dynobj, ".rela.bss");
|
|
|
cb7fb9 |
+ s = bfd_get_linker_section (htab->dynobj, ".rela.bss");
|
|
|
cb7fb9 |
BFD_ASSERT (s != NULL);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
rela.r_offset = (h->root.u.def.value
|
|
|
cb7fb9 |
@@ -3078,7 +3064,7 @@ m32r_elf_finish_dynamic_symbol (bfd *out
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Mark some specially defined symbols as absolute. */
|
|
|
cb7fb9 |
- if (h == htab->root.hdynamic || h == htab->root.hgot)
|
|
|
cb7fb9 |
+ if (h == htab->hdynamic || h == htab->hgot)
|
|
|
cb7fb9 |
sym->st_shndx = SHN_ABS;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
return TRUE;
|
|
|
cb7fb9 |
@@ -3091,7 +3077,7 @@ static bfd_boolean
|
|
|
cb7fb9 |
m32r_elf_finish_dynamic_sections (bfd *output_bfd,
|
|
|
cb7fb9 |
struct bfd_link_info *info)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- struct elf_m32r_link_hash_table *htab;
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab;
|
|
|
cb7fb9 |
bfd *dynobj;
|
|
|
cb7fb9 |
asection *sdyn;
|
|
|
cb7fb9 |
asection *sgot;
|
|
|
cb7fb9 |
@@ -3104,12 +3090,12 @@ m32r_elf_finish_dynamic_sections (bfd *o
|
|
|
cb7fb9 |
if (htab == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- dynobj = htab->root.dynobj;
|
|
|
cb7fb9 |
+ dynobj = htab->dynobj;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- sgot = htab->root.sgotplt;
|
|
|
cb7fb9 |
+ sgot = htab->sgotplt;
|
|
|
cb7fb9 |
sdyn = bfd_get_linker_section (dynobj, ".dynamic");
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (htab->root.dynamic_sections_created)
|
|
|
cb7fb9 |
+ if (htab->dynamic_sections_created)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
asection *splt;
|
|
|
cb7fb9 |
Elf32_External_Dyn *dyncon, *dynconend;
|
|
|
cb7fb9 |
@@ -3132,17 +3118,17 @@ m32r_elf_finish_dynamic_sections (bfd *o
|
|
|
cb7fb9 |
break;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
case DT_PLTGOT:
|
|
|
cb7fb9 |
- s = htab->root.sgotplt;
|
|
|
cb7fb9 |
+ s = htab->sgotplt;
|
|
|
cb7fb9 |
goto get_vma;
|
|
|
cb7fb9 |
case DT_JMPREL:
|
|
|
cb7fb9 |
- s = htab->root.srelplt;
|
|
|
cb7fb9 |
+ s = htab->srelplt;
|
|
|
cb7fb9 |
get_vma:
|
|
|
cb7fb9 |
dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
|
|
|
cb7fb9 |
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
|
|
|
cb7fb9 |
break;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
case DT_PLTRELSZ:
|
|
|
cb7fb9 |
- s = htab->root.srelplt;
|
|
|
cb7fb9 |
+ s = htab->srelplt;
|
|
|
cb7fb9 |
dyn.d_un.d_val = s->size;
|
|
|
cb7fb9 |
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
|
|
|
cb7fb9 |
break;
|
|
|
cb7fb9 |
@@ -3150,7 +3136,7 @@ m32r_elf_finish_dynamic_sections (bfd *o
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Fill in the first entry in the procedure linkage table. */
|
|
|
cb7fb9 |
- splt = htab->root.splt;
|
|
|
cb7fb9 |
+ splt = htab->splt;
|
|
|
cb7fb9 |
if (splt && splt->size > 0)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
if (bfd_link_pic (info))
|
|
|
cb7fb9 |
@@ -3369,7 +3355,7 @@ m32r_elf_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
struct elf_link_hash_entry **sym_hashes;
|
|
|
cb7fb9 |
const Elf_Internal_Rela *rel;
|
|
|
cb7fb9 |
const Elf_Internal_Rela *rel_end;
|
|
|
cb7fb9 |
- struct elf_m32r_link_hash_table *htab;
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab;
|
|
|
cb7fb9 |
bfd *dynobj;
|
|
|
cb7fb9 |
asection *sreloc;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
@@ -3384,7 +3370,7 @@ m32r_elf_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
if (htab == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- dynobj = htab->root.dynobj;
|
|
|
cb7fb9 |
+ dynobj = htab->dynobj;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
rel_end = relocs + sec->reloc_count;
|
|
|
cb7fb9 |
for (rel = relocs; rel < rel_end; rel++)
|
|
|
cb7fb9 |
@@ -3406,7 +3392,7 @@ m32r_elf_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Some relocs require a global offset table. */
|
|
|
cb7fb9 |
- if (htab->root.sgot == NULL)
|
|
|
cb7fb9 |
+ if (htab->sgot == NULL)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
switch (r_type)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
@@ -3423,7 +3409,7 @@ m32r_elf_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
case R_M32R_GOTPC_LO:
|
|
|
cb7fb9 |
case R_M32R_GOT24:
|
|
|
cb7fb9 |
if (dynobj == NULL)
|
|
|
cb7fb9 |
- htab->root.dynobj = dynobj = abfd;
|
|
|
cb7fb9 |
+ htab->dynobj = dynobj = abfd;
|
|
|
cb7fb9 |
if (!_bfd_elf_create_got_section (dynobj, info))
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
break;
|
|
|
cb7fb9 |
@@ -3540,7 +3526,7 @@ m32r_elf_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
struct elf_dyn_relocs **head;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (dynobj == NULL)
|
|
|
cb7fb9 |
- htab->root.dynobj = dynobj = abfd;
|
|
|
cb7fb9 |
+ htab->dynobj = dynobj = abfd;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* When creating a shared object, we must copy these
|
|
|
cb7fb9 |
relocs into the output file. We create a reloc
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-m68hc1x.h binutils-2.35/bfd/elf32-m68hc1x.h
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-m68hc1x.h 2020-07-30 15:04:05.378466625 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-m68hc1x.h 2020-07-30 15:04:16.710393941 +0100
|
|
|
cb7fb9 |
@@ -120,9 +120,6 @@ struct m68hc11_elf_link_hash_table
|
|
|
cb7fb9 |
int top_index;
|
|
|
cb7fb9 |
asection **input_list;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
bfd_boolean (* size_one_stub) (struct bfd_hash_entry*, void*);
|
|
|
cb7fb9 |
bfd_boolean (* build_one_stub) (struct bfd_hash_entry*, void*);
|
|
|
cb7fb9 |
};
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-m68k.c binutils-2.35/bfd/elf32-m68k.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-m68k.c 2020-07-30 15:04:05.363466721 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-m68k.c 2020-07-30 15:04:16.710393941 +0100
|
|
|
cb7fb9 |
@@ -889,9 +889,6 @@ struct elf_m68k_link_hash_table
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
struct elf_link_hash_table root;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* The PLT format used by this link, or NULL if the format has not
|
|
|
cb7fb9 |
yet been chosen. */
|
|
|
cb7fb9 |
const struct elf_m68k_plt_info *plt_info;
|
|
|
cb7fb9 |
@@ -2836,7 +2833,7 @@ elf_m68k_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
void *vpp;
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&elf_m68k_hash_table (info)->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&elf_m68k_hash_table (info)->root.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-metag.c binutils-2.35/bfd/elf32-metag.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-metag.c 2020-07-30 15:04:05.379466619 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-metag.c 2020-07-30 15:04:16.711393934 +0100
|
|
|
cb7fb9 |
@@ -823,9 +823,6 @@ struct elf_metag_link_hash_table
|
|
|
cb7fb9 |
asection **input_list;
|
|
|
cb7fb9 |
Elf_Internal_Sym **all_local_syms;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* Data for LDM relocations. */
|
|
|
cb7fb9 |
union
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
@@ -2098,7 +2095,7 @@ elf_metag_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
if (r_symndx < symtab_hdr->sh_info)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* A local symbol. */
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->etab.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-microblaze.c binutils-2.35/bfd/elf32-microblaze.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-microblaze.c 2020-07-30 15:04:05.367466696 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-microblaze.c 2020-07-30 15:04:16.711393934 +0100
|
|
|
cb7fb9 |
@@ -744,9 +744,6 @@ struct elf32_mb_link_hash_table
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
struct elf_link_hash_table elf;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym to section mapping cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_sec;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* TLS Local Dynamic GOT Entry */
|
|
|
cb7fb9 |
union {
|
|
|
cb7fb9 |
bfd_signed_vma refcount;
|
|
|
cb7fb9 |
@@ -2523,7 +2520,7 @@ microblaze_elf_check_relocs (bfd * abfd,
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
void *vpp;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_sec,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-nds32.c binutils-2.35/bfd/elf32-nds32.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-nds32.c 2020-07-30 15:04:05.365466709 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-nds32.c 2020-07-30 15:04:16.712393928 +0100
|
|
|
cb7fb9 |
@@ -3696,8 +3696,6 @@ nds32_elf_link_hash_table_create (bfd *a
|
|
|
cb7fb9 |
return NULL;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- ret->sdynbss = NULL;
|
|
|
cb7fb9 |
- ret->srelbss = NULL;
|
|
|
cb7fb9 |
ret->sym_ld_script = NULL;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
return &ret->root.root;
|
|
|
cb7fb9 |
@@ -3833,7 +3831,7 @@ nds32_elf_create_dynamic_sections (bfd *
|
|
|
cb7fb9 |
initialize them at run time. The linker script puts the .dynbss
|
|
|
cb7fb9 |
section into the .bss section of the final image. */
|
|
|
cb7fb9 |
s = bfd_make_section (abfd, ".dynbss");
|
|
|
cb7fb9 |
- htab->sdynbss = s;
|
|
|
cb7fb9 |
+ htab->root.sdynbss = s;
|
|
|
cb7fb9 |
if (s == NULL
|
|
|
cb7fb9 |
|| !bfd_set_section_flags (s, SEC_ALLOC | SEC_LINKER_CREATED))
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -3852,7 +3850,7 @@ nds32_elf_create_dynamic_sections (bfd *
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
s = bfd_make_section (abfd, (bed->default_use_rela_p
|
|
|
cb7fb9 |
? ".rela.bss" : ".rel.bss"));
|
|
|
cb7fb9 |
- htab->srelbss = s;
|
|
|
cb7fb9 |
+ htab->root.srelbss = s;
|
|
|
cb7fb9 |
if (s == NULL
|
|
|
cb7fb9 |
|| !bfd_set_section_flags (s, flags | SEC_READONLY)
|
|
|
cb7fb9 |
|| !bfd_set_section_alignment (s, ptralign))
|
|
|
cb7fb9 |
@@ -3988,7 +3986,7 @@ nds32_elf_adjust_dynamic_symbol (struct
|
|
|
cb7fb9 |
same memory location for the variable. */
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
htab = nds32_elf_hash_table (info);
|
|
|
cb7fb9 |
- s = htab->sdynbss;
|
|
|
cb7fb9 |
+ s = htab->root.sdynbss;
|
|
|
cb7fb9 |
BFD_ASSERT (s != NULL);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* We must generate a R_NDS32_COPY reloc to tell the dynamic linker
|
|
|
cb7fb9 |
@@ -3999,7 +3997,7 @@ nds32_elf_adjust_dynamic_symbol (struct
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
asection *srel;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- srel = htab->srelbss;
|
|
|
cb7fb9 |
+ srel = htab->root.srelbss;
|
|
|
cb7fb9 |
BFD_ASSERT (srel != NULL);
|
|
|
cb7fb9 |
srel->size += sizeof (Elf32_External_Rela);
|
|
|
cb7fb9 |
h->needs_copy = 1;
|
|
|
cb7fb9 |
@@ -7277,7 +7275,8 @@ nds32_elf_check_relocs (bfd *abfd, struc
|
|
|
cb7fb9 |
void *vpp;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache, abfd, r_symndx);
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache,
|
|
|
cb7fb9 |
+ abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-nds32.h binutils-2.35/bfd/elf32-nds32.h
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-nds32.h 2020-07-30 15:04:05.378466625 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-nds32.h 2020-07-30 15:04:16.712393928 +0100
|
|
|
cb7fb9 |
@@ -122,13 +122,6 @@ struct elf_nds32_link_hash_table
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
struct elf_link_hash_table root;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Short-cuts to get to dynamic linker sections. */
|
|
|
cb7fb9 |
- asection *sdynbss;
|
|
|
cb7fb9 |
- asection *srelbss;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
- /* Small local sym to section mapping cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* Target dependent options. */
|
|
|
cb7fb9 |
int relax_fp_as_gp; /* --mrelax-omit-fp. */
|
|
|
cb7fb9 |
int eliminate_gc_relocs; /* --meliminate-gc-relocs. */
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-nios2.c binutils-2.35/bfd/elf32-nios2.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-nios2.c 2020-07-30 15:04:05.375466645 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-nios2.c 2020-07-30 15:04:16.712393928 +0100
|
|
|
cb7fb9 |
@@ -1808,9 +1808,6 @@ struct elf32_nios2_link_hash_table
|
|
|
cb7fb9 |
bfd_vma offset;
|
|
|
cb7fb9 |
} tls_ldm_got;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
bfd_vma res_n_size;
|
|
|
cb7fb9 |
};
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
@@ -4902,7 +4899,7 @@ nios2_elf32_check_relocs (bfd *abfd, str
|
|
|
cb7fb9 |
void *vpp;
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-or1k.c binutils-2.35/bfd/elf32-or1k.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-or1k.c 2020-07-30 15:04:05.371466670 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-or1k.c 2020-07-30 15:04:16.713393921 +0100
|
|
|
cb7fb9 |
@@ -916,9 +916,6 @@ struct elf_or1k_link_hash_table
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
struct elf_link_hash_table root;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym to section mapping cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_sec;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
bfd_boolean saw_plta;
|
|
|
cb7fb9 |
};
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
@@ -2151,7 +2148,7 @@ or1k_elf_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
void *vpp;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_sec,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-ppc.c binutils-2.35/bfd/elf32-ppc.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-ppc.c 2020-07-30 15:04:05.359466747 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-ppc.c 2020-07-30 15:04:16.713393921 +0100
|
|
|
cb7fb9 |
@@ -2212,9 +2212,6 @@ struct ppc_elf_link_hash_table
|
|
|
cb7fb9 |
int plt_slot_size;
|
|
|
cb7fb9 |
/* The size of the first PLT entry. */
|
|
|
cb7fb9 |
int plt_initial_entry_size;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
};
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Rename some of the generic section flags to better document how they
|
|
|
cb7fb9 |
@@ -2952,7 +2949,7 @@ ppc_elf_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
ifunc = NULL;
|
|
|
cb7fb9 |
if (h == NULL && htab->elf.target_os != is_vxworks)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -3335,7 +3332,7 @@ ppc_elf_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
asection *s;
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -3495,7 +3492,7 @@ ppc_elf_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
void *vpp;
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-s390.c binutils-2.35/bfd/elf32-s390.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-s390.c 2020-07-30 15:04:05.376466638 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-s390.c 2020-07-30 15:04:16.714393915 +0100
|
|
|
cb7fb9 |
@@ -746,9 +746,6 @@ struct elf_s390_link_hash_table
|
|
|
cb7fb9 |
bfd_signed_vma refcount;
|
|
|
cb7fb9 |
bfd_vma offset;
|
|
|
cb7fb9 |
} tls_ldm_got;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
};
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Get the s390 ELF linker hash table from a link_info structure. */
|
|
|
cb7fb9 |
@@ -930,7 +927,7 @@ elf_s390_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
if (r_symndx < symtab_hdr->sh_info)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* A local symbol. */
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -1281,7 +1278,7 @@ elf_s390_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
asection *s;
|
|
|
cb7fb9 |
void *vpp;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -3722,7 +3719,7 @@ elf_s390_finish_dynamic_sections (bfd *o
|
|
|
cb7fb9 |
if (local_plt[i].plt.offset != (bfd_vma) -1)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
asection *sec = local_plt[i].sec;
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ibfd, i);
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, ibfd, i);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-sh.c binutils-2.35/bfd/elf32-sh.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-sh.c 2020-07-30 15:04:05.376466638 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-sh.c 2020-07-30 15:04:16.714393915 +0100
|
|
|
cb7fb9 |
@@ -2160,8 +2160,6 @@ struct elf_sh_link_hash_table
|
|
|
cb7fb9 |
struct elf_link_hash_table root;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Short-cuts to get to dynamic linker sections. */
|
|
|
cb7fb9 |
- asection *sdynbss;
|
|
|
cb7fb9 |
- asection *srelbss;
|
|
|
cb7fb9 |
asection *sfuncdesc;
|
|
|
cb7fb9 |
asection *srelfuncdesc;
|
|
|
cb7fb9 |
asection *srofixup;
|
|
|
cb7fb9 |
@@ -2169,9 +2167,6 @@ struct elf_sh_link_hash_table
|
|
|
cb7fb9 |
/* The (unloaded but important) VxWorks .rela.plt.unloaded section. */
|
|
|
cb7fb9 |
asection *srelplt2;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* A counter or offset to track a TLS got entry. */
|
|
|
cb7fb9 |
union
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
@@ -2439,7 +2434,7 @@ sh_elf_create_dynamic_sections (bfd *abf
|
|
|
cb7fb9 |
section into the .bss section of the final image. */
|
|
|
cb7fb9 |
s = bfd_make_section_anyway_with_flags (abfd, ".dynbss",
|
|
|
cb7fb9 |
SEC_ALLOC | SEC_LINKER_CREATED);
|
|
|
cb7fb9 |
- htab->sdynbss = s;
|
|
|
cb7fb9 |
+ htab->root.sdynbss = s;
|
|
|
cb7fb9 |
if (s == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
@@ -2460,7 +2455,7 @@ sh_elf_create_dynamic_sections (bfd *abf
|
|
|
cb7fb9 |
(bed->default_use_rela_p
|
|
|
cb7fb9 |
? ".rela.bss" : ".rel.bss"),
|
|
|
cb7fb9 |
flags | SEC_READONLY);
|
|
|
cb7fb9 |
- htab->srelbss = s;
|
|
|
cb7fb9 |
+ htab->root.srelbss = s;
|
|
|
cb7fb9 |
if (s == NULL
|
|
|
cb7fb9 |
|| !bfd_set_section_alignment (s, ptralign))
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -2580,7 +2575,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd
|
|
|
cb7fb9 |
both the dynamic object and the regular object will refer to the
|
|
|
cb7fb9 |
same memory location for the variable. */
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- s = htab->sdynbss;
|
|
|
cb7fb9 |
+ s = htab->root.sdynbss;
|
|
|
cb7fb9 |
BFD_ASSERT (s != NULL);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* We must generate a R_SH_COPY reloc to tell the dynamic linker to
|
|
|
cb7fb9 |
@@ -2591,7 +2586,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
asection *srel;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- srel = htab->srelbss;
|
|
|
cb7fb9 |
+ srel = htab->root.srelbss;
|
|
|
cb7fb9 |
BFD_ASSERT (srel != NULL);
|
|
|
cb7fb9 |
srel->size += sizeof (Elf32_External_Rela);
|
|
|
cb7fb9 |
h->needs_copy = 1;
|
|
|
cb7fb9 |
@@ -3151,7 +3146,7 @@ sh_elf_size_dynamic_sections (bfd *outpu
|
|
|
cb7fb9 |
|| s == htab->root.sgotplt
|
|
|
cb7fb9 |
|| s == htab->sfuncdesc
|
|
|
cb7fb9 |
|| s == htab->srofixup
|
|
|
cb7fb9 |
- || s == htab->sdynbss)
|
|
|
cb7fb9 |
+ || s == htab->root.sdynbss)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* Strip this section if we don't need it; see the
|
|
|
cb7fb9 |
comment below. */
|
|
|
cb7fb9 |
@@ -5679,7 +5674,7 @@ sh_elf_check_relocs (bfd *abfd, struct b
|
|
|
cb7fb9 |
void *vpp;
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-tic6x.c binutils-2.35/bfd/elf32-tic6x.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-tic6x.c 2020-07-30 15:04:05.366466702 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-tic6x.c 2020-07-30 15:04:16.714393915 +0100
|
|
|
cb7fb9 |
@@ -46,9 +46,6 @@ struct elf32_tic6x_link_hash_table
|
|
|
cb7fb9 |
/* C6X specific command line arguments. */
|
|
|
cb7fb9 |
struct elf32_tic6x_params params;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* The output BFD, for convenience. */
|
|
|
cb7fb9 |
bfd *obfd;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
@@ -2729,7 +2726,7 @@ elf32_tic6x_check_relocs (bfd *abfd, str
|
|
|
cb7fb9 |
if (r_symndx < symtab_hdr->sh_info)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* A local symbol. */
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf32-tilepro.c binutils-2.35/bfd/elf32-tilepro.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf32-tilepro.c 2020-07-30 15:04:05.364466715 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf32-tilepro.c 2020-07-30 15:04:16.715393908 +0100
|
|
|
cb7fb9 |
@@ -727,19 +727,11 @@ tilepro_elf_mkobject (bfd *abfd)
|
|
|
cb7fb9 |
#include "elf/common.h"
|
|
|
cb7fb9 |
#include "elf/internal.h"
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
-struct tilepro_elf_link_hash_table
|
|
|
cb7fb9 |
-{
|
|
|
cb7fb9 |
- struct elf_link_hash_table elf;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
- /* Small local sym to section mapping cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-};
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* Get the Tilepro ELF linker hash table from a link_info structure. */
|
|
|
cb7fb9 |
#define tilepro_elf_hash_table(p) \
|
|
|
cb7fb9 |
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
|
|
|
cb7fb9 |
== TILEPRO_ELF_DATA \
|
|
|
cb7fb9 |
- ? ((struct tilepro_elf_link_hash_table *) ((p)->hash)) : NULL)
|
|
|
cb7fb9 |
+ ? ((struct elf_link_hash_table *) ((p)->hash)) : NULL)
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
static reloc_howto_type *
|
|
|
cb7fb9 |
tilepro_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,
|
|
|
cb7fb9 |
@@ -1184,14 +1176,14 @@ link_hash_newfunc (struct bfd_hash_entry
|
|
|
cb7fb9 |
static struct bfd_link_hash_table *
|
|
|
cb7fb9 |
tilepro_elf_link_hash_table_create (bfd *abfd)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- struct tilepro_elf_link_hash_table *ret;
|
|
|
cb7fb9 |
- size_t amt = sizeof (struct tilepro_elf_link_hash_table);
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *ret;
|
|
|
cb7fb9 |
+ size_t amt = sizeof (struct elf_link_hash_table);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- ret = (struct tilepro_elf_link_hash_table *) bfd_zmalloc (amt);
|
|
|
cb7fb9 |
+ ret = (struct elf_link_hash_table *) bfd_zmalloc (amt);
|
|
|
cb7fb9 |
if (ret == NULL)
|
|
|
cb7fb9 |
return NULL;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc,
|
|
|
cb7fb9 |
+ if (!_bfd_elf_link_hash_table_init (ret, abfd, link_hash_newfunc,
|
|
|
cb7fb9 |
sizeof (struct tilepro_elf_link_hash_entry),
|
|
|
cb7fb9 |
TILEPRO_ELF_DATA))
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
@@ -1199,7 +1191,7 @@ tilepro_elf_link_hash_table_create (bfd
|
|
|
cb7fb9 |
return NULL;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- return &ret->elf.root;
|
|
|
cb7fb9 |
+ return &ret->root;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Create the .got section. */
|
|
|
cb7fb9 |
@@ -1402,7 +1394,7 @@ static bfd_boolean
|
|
|
cb7fb9 |
tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
|
|
cb7fb9 |
asection *sec, const Elf_Internal_Rela *relocs)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- struct tilepro_elf_link_hash_table *htab;
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab;
|
|
|
cb7fb9 |
Elf_Internal_Shdr *symtab_hdr;
|
|
|
cb7fb9 |
struct elf_link_hash_entry **sym_hashes;
|
|
|
cb7fb9 |
const Elf_Internal_Rela *rel;
|
|
|
cb7fb9 |
@@ -1423,8 +1415,8 @@ tilepro_elf_check_relocs (bfd *abfd, str
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
BFD_ASSERT (is_tilepro_elf (abfd) || num_relocs == 0);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (htab->elf.dynobj == NULL)
|
|
|
cb7fb9 |
- htab->elf.dynobj = abfd;
|
|
|
cb7fb9 |
+ if (htab->dynobj == NULL)
|
|
|
cb7fb9 |
+ htab->dynobj = abfd;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
rel_end = relocs + num_relocs;
|
|
|
cb7fb9 |
for (rel = relocs; rel < rel_end; rel++)
|
|
|
cb7fb9 |
@@ -1569,9 +1561,9 @@ tilepro_elf_check_relocs (bfd *abfd, str
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (htab->elf.sgot == NULL)
|
|
|
cb7fb9 |
+ if (htab->sgot == NULL)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- if (!tilepro_elf_create_got_section (htab->elf.dynobj, info))
|
|
|
cb7fb9 |
+ if (!tilepro_elf_create_got_section (htab->dynobj, info))
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
break;
|
|
|
cb7fb9 |
@@ -1716,7 +1708,7 @@ tilepro_elf_check_relocs (bfd *abfd, str
|
|
|
cb7fb9 |
if (sreloc == NULL)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
sreloc = _bfd_elf_make_dynamic_reloc_section
|
|
|
cb7fb9 |
- (sec, htab->elf.dynobj, 2, abfd, /*rela?*/ TRUE);
|
|
|
cb7fb9 |
+ (sec, htab->dynobj, 2, abfd, /*rela?*/ TRUE);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (sreloc == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -1754,7 +1746,7 @@ tilepro_elf_check_relocs (bfd *abfd, str
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
size_t amt = sizeof *p;
|
|
|
cb7fb9 |
p = ((struct elf_dyn_relocs *)
|
|
|
cb7fb9 |
- bfd_alloc (htab->elf.dynobj, amt));
|
|
|
cb7fb9 |
+ bfd_alloc (htab->dynobj, amt));
|
|
|
cb7fb9 |
if (p == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
p->next = *head;
|
|
|
cb7fb9 |
@@ -1850,14 +1842,14 @@ static bfd_boolean
|
|
|
cb7fb9 |
tilepro_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
|
|
|
cb7fb9 |
struct elf_link_hash_entry *h)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- struct tilepro_elf_link_hash_table *htab;
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab;
|
|
|
cb7fb9 |
asection *s, *srel;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
htab = tilepro_elf_hash_table (info);
|
|
|
cb7fb9 |
BFD_ASSERT (htab != NULL);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Make sure we know what is going on here. */
|
|
|
cb7fb9 |
- BFD_ASSERT (htab->elf.dynobj != NULL
|
|
|
cb7fb9 |
+ BFD_ASSERT (htab->dynobj != NULL
|
|
|
cb7fb9 |
&& (h->needs_plt
|
|
|
cb7fb9 |
|| h->is_weakalias
|
|
|
cb7fb9 |
|| (h->def_dynamic
|
|
|
cb7fb9 |
@@ -1947,13 +1939,13 @@ tilepro_elf_adjust_dynamic_symbol (struc
|
|
|
cb7fb9 |
.rel.bss section we are going to use. */
|
|
|
cb7fb9 |
if ((h->root.u.def.section->flags & SEC_READONLY) != 0)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- s = htab->elf.sdynrelro;
|
|
|
cb7fb9 |
- srel = htab->elf.sreldynrelro;
|
|
|
cb7fb9 |
+ s = htab->sdynrelro;
|
|
|
cb7fb9 |
+ srel = htab->sreldynrelro;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
else
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- s = htab->elf.sdynbss;
|
|
|
cb7fb9 |
- srel = htab->elf.srelbss;
|
|
|
cb7fb9 |
+ s = htab->sdynbss;
|
|
|
cb7fb9 |
+ srel = htab->srelbss;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
@@ -1971,7 +1963,7 @@ static bfd_boolean
|
|
|
cb7fb9 |
allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
struct bfd_link_info *info;
|
|
|
cb7fb9 |
- struct tilepro_elf_link_hash_table *htab;
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab;
|
|
|
cb7fb9 |
struct elf_dyn_relocs *p;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (h->root.type == bfd_link_hash_indirect)
|
|
|
cb7fb9 |
@@ -1981,7 +1973,7 @@ allocate_dynrelocs (struct elf_link_hash
|
|
|
cb7fb9 |
htab = tilepro_elf_hash_table (info);
|
|
|
cb7fb9 |
BFD_ASSERT (htab != NULL);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (htab->elf.dynamic_sections_created
|
|
|
cb7fb9 |
+ if (htab->dynamic_sections_created
|
|
|
cb7fb9 |
&& h->plt.refcount > 0)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* Make sure this symbol is output as a dynamic symbol.
|
|
|
cb7fb9 |
@@ -1995,7 +1987,7 @@ allocate_dynrelocs (struct elf_link_hash
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h))
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- asection *s = htab->elf.splt;
|
|
|
cb7fb9 |
+ asection *s = htab->splt;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Allocate room for the header. */
|
|
|
cb7fb9 |
if (s->size == 0)
|
|
|
cb7fb9 |
@@ -2021,10 +2013,10 @@ allocate_dynrelocs (struct elf_link_hash
|
|
|
cb7fb9 |
s->size += PLT_ENTRY_SIZE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* We also need to make an entry in the .got.plt section. */
|
|
|
cb7fb9 |
- htab->elf.sgotplt->size += GOT_ENTRY_SIZE;
|
|
|
cb7fb9 |
+ htab->sgotplt->size += GOT_ENTRY_SIZE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* We also need to make an entry in the .rela.plt section. */
|
|
|
cb7fb9 |
- htab->elf.srelplt->size += TILEPRO_ELF_RELA_BYTES;
|
|
|
cb7fb9 |
+ htab->srelplt->size += TILEPRO_ELF_RELA_BYTES;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
else
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
@@ -2060,22 +2052,22 @@ allocate_dynrelocs (struct elf_link_hash
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- s = htab->elf.sgot;
|
|
|
cb7fb9 |
+ s = htab->sgot;
|
|
|
cb7fb9 |
h->got.offset = s->size;
|
|
|
cb7fb9 |
s->size += TILEPRO_BYTES_PER_WORD;
|
|
|
cb7fb9 |
/* R_TILEPRO_IMM16_Xn_TLS_GD entries need 2 consecutive GOT slots. */
|
|
|
cb7fb9 |
if (tls_type == GOT_TLS_GD)
|
|
|
cb7fb9 |
s->size += TILEPRO_BYTES_PER_WORD;
|
|
|
cb7fb9 |
- dyn = htab->elf.dynamic_sections_created;
|
|
|
cb7fb9 |
+ dyn = htab->dynamic_sections_created;
|
|
|
cb7fb9 |
/* R_TILEPRO_IMM16_Xn_TLS_IE_xxx needs one dynamic relocation,
|
|
|
cb7fb9 |
R_TILEPRO_IMM16_Xn_TLS_GD_xxx needs two if local symbol and two if
|
|
|
cb7fb9 |
global. */
|
|
|
cb7fb9 |
if (tls_type == GOT_TLS_GD || tls_type == GOT_TLS_IE)
|
|
|
cb7fb9 |
- htab->elf.srelgot->size += 2 * TILEPRO_ELF_RELA_BYTES;
|
|
|
cb7fb9 |
+ htab->srelgot->size += 2 * TILEPRO_ELF_RELA_BYTES;
|
|
|
cb7fb9 |
else if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
|
|
|
cb7fb9 |
bfd_link_pic (info),
|
|
|
cb7fb9 |
h))
|
|
|
cb7fb9 |
- htab->elf.srelgot->size += TILEPRO_ELF_RELA_BYTES;
|
|
|
cb7fb9 |
+ htab->srelgot->size += TILEPRO_ELF_RELA_BYTES;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
else
|
|
|
cb7fb9 |
h->got.offset = (bfd_vma) -1;
|
|
|
cb7fb9 |
@@ -2134,7 +2126,7 @@ allocate_dynrelocs (struct elf_link_hash
|
|
|
cb7fb9 |
if (!h->non_got_ref
|
|
|
cb7fb9 |
&& ((h->def_dynamic
|
|
|
cb7fb9 |
&& !h->def_regular)
|
|
|
cb7fb9 |
- || (htab->elf.dynamic_sections_created
|
|
|
cb7fb9 |
+ || (htab->dynamic_sections_created
|
|
|
cb7fb9 |
&& (h->root.type == bfd_link_hash_undefweak
|
|
|
cb7fb9 |
|| h->root.type == bfd_link_hash_undefined))))
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
@@ -2195,14 +2187,14 @@ tilepro_elf_size_dynamic_sections (bfd *
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
(void)output_bfd;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- struct tilepro_elf_link_hash_table *htab;
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab;
|
|
|
cb7fb9 |
bfd *dynobj;
|
|
|
cb7fb9 |
asection *s;
|
|
|
cb7fb9 |
bfd *ibfd;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
htab = tilepro_elf_hash_table (info);
|
|
|
cb7fb9 |
BFD_ASSERT (htab != NULL);
|
|
|
cb7fb9 |
- dynobj = htab->elf.dynobj;
|
|
|
cb7fb9 |
+ dynobj = htab->dynobj;
|
|
|
cb7fb9 |
BFD_ASSERT (dynobj != NULL);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (elf_hash_table (info)->dynamic_sections_created)
|
|
|
cb7fb9 |
@@ -2268,8 +2260,8 @@ tilepro_elf_size_dynamic_sections (bfd *
|
|
|
cb7fb9 |
locsymcount = symtab_hdr->sh_info;
|
|
|
cb7fb9 |
end_local_got = local_got + locsymcount;
|
|
|
cb7fb9 |
local_tls_type = _bfd_tilepro_elf_local_got_tls_type (ibfd);
|
|
|
cb7fb9 |
- s = htab->elf.sgot;
|
|
|
cb7fb9 |
- srel = htab->elf.srelgot;
|
|
|
cb7fb9 |
+ s = htab->sgot;
|
|
|
cb7fb9 |
+ srel = htab->srelgot;
|
|
|
cb7fb9 |
for (; local_got < end_local_got; ++local_got, ++local_tls_type)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
if (*local_got > 0)
|
|
|
cb7fb9 |
@@ -2290,19 +2282,19 @@ tilepro_elf_size_dynamic_sections (bfd *
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Allocate global sym .plt and .got entries, and space for global
|
|
|
cb7fb9 |
sym dynamic relocs. */
|
|
|
cb7fb9 |
- elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, info);
|
|
|
cb7fb9 |
+ elf_link_hash_traverse (htab, allocate_dynrelocs, info);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (elf_hash_table (info)->dynamic_sections_created)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* If the .got section is more than 0x8000 bytes, we add
|
|
|
cb7fb9 |
0x8000 to the value of _GLOBAL_OFFSET_TABLE_, so that 16
|
|
|
cb7fb9 |
bit relocations have a greater chance of working. */
|
|
|
cb7fb9 |
- if (htab->elf.sgot->size >= 0x8000
|
|
|
cb7fb9 |
+ if (htab->sgot->size >= 0x8000
|
|
|
cb7fb9 |
&& elf_hash_table (info)->hgot->root.u.def.value == 0)
|
|
|
cb7fb9 |
elf_hash_table (info)->hgot->root.u.def.value = 0x8000;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (htab->elf.sgotplt)
|
|
|
cb7fb9 |
+ if (htab->sgotplt)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
struct elf_link_hash_entry *got;
|
|
|
cb7fb9 |
got = elf_link_hash_lookup (elf_hash_table (info),
|
|
|
cb7fb9 |
@@ -2313,14 +2305,14 @@ tilepro_elf_size_dynamic_sections (bfd *
|
|
|
cb7fb9 |
entries and there is no refeence to _GLOBAL_OFFSET_TABLE_. */
|
|
|
cb7fb9 |
if ((got == NULL
|
|
|
cb7fb9 |
|| !got->ref_regular_nonweak)
|
|
|
cb7fb9 |
- && (htab->elf.sgotplt->size
|
|
|
cb7fb9 |
+ && (htab->sgotplt->size
|
|
|
cb7fb9 |
== GOTPLT_HEADER_SIZE)
|
|
|
cb7fb9 |
- && (htab->elf.splt == NULL
|
|
|
cb7fb9 |
- || htab->elf.splt->size == 0)
|
|
|
cb7fb9 |
- && (htab->elf.sgot == NULL
|
|
|
cb7fb9 |
- || (htab->elf.sgot->size
|
|
|
cb7fb9 |
+ && (htab->splt == NULL
|
|
|
cb7fb9 |
+ || htab->splt->size == 0)
|
|
|
cb7fb9 |
+ && (htab->sgot == NULL
|
|
|
cb7fb9 |
+ || (htab->sgot->size
|
|
|
cb7fb9 |
== get_elf_backend_data (output_bfd)->got_header_size)))
|
|
|
cb7fb9 |
- htab->elf.sgotplt->size = 0;
|
|
|
cb7fb9 |
+ htab->sgotplt->size = 0;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* The check_relocs and adjust_dynamic_symbol entry points have
|
|
|
cb7fb9 |
@@ -2331,11 +2323,11 @@ tilepro_elf_size_dynamic_sections (bfd *
|
|
|
cb7fb9 |
if ((s->flags & SEC_LINKER_CREATED) == 0)
|
|
|
cb7fb9 |
continue;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (s == htab->elf.splt
|
|
|
cb7fb9 |
- || s == htab->elf.sgot
|
|
|
cb7fb9 |
- || s == htab->elf.sgotplt
|
|
|
cb7fb9 |
- || s == htab->elf.sdynbss
|
|
|
cb7fb9 |
- || s == htab->elf.sdynrelro)
|
|
|
cb7fb9 |
+ if (s == htab->splt
|
|
|
cb7fb9 |
+ || s == htab->sgot
|
|
|
cb7fb9 |
+ || s == htab->sgotplt
|
|
|
cb7fb9 |
+ || s == htab->sdynbss
|
|
|
cb7fb9 |
+ || s == htab->sdynrelro)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* Strip this section if we don't need it; see the
|
|
|
cb7fb9 |
comment below. */
|
|
|
cb7fb9 |
@@ -2527,7 +2519,7 @@ tilepro_elf_relocate_section (bfd *outpu
|
|
|
cb7fb9 |
Elf_Internal_Sym *local_syms,
|
|
|
cb7fb9 |
asection **local_sections)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- struct tilepro_elf_link_hash_table *htab;
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab;
|
|
|
cb7fb9 |
Elf_Internal_Shdr *symtab_hdr;
|
|
|
cb7fb9 |
struct elf_link_hash_entry **sym_hashes;
|
|
|
cb7fb9 |
bfd_vma *local_got_offsets;
|
|
|
cb7fb9 |
@@ -2758,7 +2750,7 @@ tilepro_elf_relocate_section (bfd *outpu
|
|
|
cb7fb9 |
case R_TILEPRO_IMM16_X1_GOT_HA:
|
|
|
cb7fb9 |
/* Relocation is to the entry for this symbol in the global
|
|
|
cb7fb9 |
offset table. */
|
|
|
cb7fb9 |
- if (htab->elf.sgot == NULL)
|
|
|
cb7fb9 |
+ if (htab->sgot == NULL)
|
|
|
cb7fb9 |
abort ();
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (h != NULL)
|
|
|
cb7fb9 |
@@ -2792,7 +2784,7 @@ tilepro_elf_relocate_section (bfd *outpu
|
|
|
cb7fb9 |
else
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
bfd_put_32 (output_bfd, relocation,
|
|
|
cb7fb9 |
- htab->elf.sgot->contents + off);
|
|
|
cb7fb9 |
+ htab->sgot->contents + off);
|
|
|
cb7fb9 |
h->got.offset |= 1;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
@@ -2820,11 +2812,11 @@ tilepro_elf_relocate_section (bfd *outpu
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* We need to generate a R_TILEPRO_RELATIVE reloc
|
|
|
cb7fb9 |
for the dynamic linker. */
|
|
|
cb7fb9 |
- s = htab->elf.srelgot;
|
|
|
cb7fb9 |
+ s = htab->srelgot;
|
|
|
cb7fb9 |
BFD_ASSERT (s != NULL);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- outrel.r_offset = (htab->elf.sgot->output_section->vma
|
|
|
cb7fb9 |
- + htab->elf.sgot->output_offset
|
|
|
cb7fb9 |
+ outrel.r_offset = (htab->sgot->output_section->vma
|
|
|
cb7fb9 |
+ + htab->sgot->output_offset
|
|
|
cb7fb9 |
+ off);
|
|
|
cb7fb9 |
outrel.r_info = ELF32_R_INFO (0, R_TILEPRO_RELATIVE);
|
|
|
cb7fb9 |
outrel.r_addend = relocation;
|
|
|
cb7fb9 |
@@ -2833,7 +2825,7 @@ tilepro_elf_relocate_section (bfd *outpu
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
bfd_put_32 (output_bfd, relocation,
|
|
|
cb7fb9 |
- htab->elf.sgot->contents + off);
|
|
|
cb7fb9 |
+ htab->sgot->contents + off);
|
|
|
cb7fb9 |
local_got_offsets[r_symndx] |= 1;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
@@ -2845,7 +2837,7 @@ tilepro_elf_relocate_section (bfd *outpu
|
|
|
cb7fb9 |
procedure linkage table. */
|
|
|
cb7fb9 |
BFD_ASSERT (h != NULL);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (h->plt.offset == (bfd_vma) -1 || htab->elf.splt == NULL)
|
|
|
cb7fb9 |
+ if (h->plt.offset == (bfd_vma) -1 || htab->splt == NULL)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* We didn't make a PLT entry for this symbol. This
|
|
|
cb7fb9 |
happens when statically linking PIC code, or when
|
|
|
cb7fb9 |
@@ -2853,8 +2845,8 @@ tilepro_elf_relocate_section (bfd *outpu
|
|
|
cb7fb9 |
break;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- relocation = (htab->elf.splt->output_section->vma
|
|
|
cb7fb9 |
- + htab->elf.splt->output_offset
|
|
|
cb7fb9 |
+ relocation = (htab->splt->output_section->vma
|
|
|
cb7fb9 |
+ + htab->splt->output_offset
|
|
|
cb7fb9 |
+ h->plt.offset);
|
|
|
cb7fb9 |
unresolved_reloc = FALSE;
|
|
|
cb7fb9 |
break;
|
|
|
cb7fb9 |
@@ -2993,7 +2985,7 @@ tilepro_elf_relocate_section (bfd *outpu
|
|
|
cb7fb9 |
outrel.r_addend = relocation + rel->r_addend;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (is_plt)
|
|
|
cb7fb9 |
- sec = htab->elf.splt;
|
|
|
cb7fb9 |
+ sec = htab->splt;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (bfd_is_abs_section (sec))
|
|
|
cb7fb9 |
indx = 0;
|
|
|
cb7fb9 |
@@ -3016,7 +3008,7 @@ tilepro_elf_relocate_section (bfd *outpu
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (indx == 0)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- osec = htab->elf.text_index_section;
|
|
|
cb7fb9 |
+ osec = htab->text_index_section;
|
|
|
cb7fb9 |
indx = elf_section_data (osec)->dynindx;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
@@ -3142,7 +3134,7 @@ tilepro_elf_relocate_section (bfd *outpu
|
|
|
cb7fb9 |
local_got_offsets[r_symndx] |= 1;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (htab->elf.sgot == NULL)
|
|
|
cb7fb9 |
+ if (htab->sgot == NULL)
|
|
|
cb7fb9 |
abort ();
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if ((off & 1) != 0)
|
|
|
cb7fb9 |
@@ -3153,13 +3145,13 @@ tilepro_elf_relocate_section (bfd *outpu
|
|
|
cb7fb9 |
int indx = 0;
|
|
|
cb7fb9 |
bfd_boolean need_relocs = FALSE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (htab->elf.srelgot == NULL)
|
|
|
cb7fb9 |
+ if (htab->srelgot == NULL)
|
|
|
cb7fb9 |
abort ();
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (h != NULL)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
bfd_boolean dyn;
|
|
|
cb7fb9 |
- dyn = htab->elf.dynamic_sections_created;
|
|
|
cb7fb9 |
+ dyn = htab->dynamic_sections_created;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn,
|
|
|
cb7fb9 |
bfd_link_pic (info),
|
|
|
cb7fb9 |
@@ -3190,18 +3182,18 @@ tilepro_elf_relocate_section (bfd *outpu
|
|
|
cb7fb9 |
case R_TILEPRO_IMM16_X0_TLS_IE_HA:
|
|
|
cb7fb9 |
case R_TILEPRO_IMM16_X1_TLS_IE_HA:
|
|
|
cb7fb9 |
if (need_relocs) {
|
|
|
cb7fb9 |
- bfd_put_32 (output_bfd, 0, htab->elf.sgot->contents + off);
|
|
|
cb7fb9 |
- outrel.r_offset = (htab->elf.sgot->output_section->vma
|
|
|
cb7fb9 |
- + htab->elf.sgot->output_offset + off);
|
|
|
cb7fb9 |
+ bfd_put_32 (output_bfd, 0, htab->sgot->contents + off);
|
|
|
cb7fb9 |
+ outrel.r_offset = (htab->sgot->output_section->vma
|
|
|
cb7fb9 |
+ + htab->sgot->output_offset + off);
|
|
|
cb7fb9 |
outrel.r_addend = 0;
|
|
|
cb7fb9 |
if (indx == 0)
|
|
|
cb7fb9 |
outrel.r_addend = relocation - dtpoff_base (info);
|
|
|
cb7fb9 |
outrel.r_info = ELF32_R_INFO (indx, R_TILEPRO_TLS_TPOFF32);
|
|
|
cb7fb9 |
- tilepro_elf_append_rela_32 (output_bfd, htab->elf.srelgot,
|
|
|
cb7fb9 |
+ tilepro_elf_append_rela_32 (output_bfd, htab->srelgot,
|
|
|
cb7fb9 |
&outrel);
|
|
|
cb7fb9 |
} else {
|
|
|
cb7fb9 |
bfd_put_32 (output_bfd, tpoff (info, relocation),
|
|
|
cb7fb9 |
- htab->elf.sgot->contents + off);
|
|
|
cb7fb9 |
+ htab->sgot->contents + off);
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
break;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
@@ -3214,31 +3206,31 @@ tilepro_elf_relocate_section (bfd *outpu
|
|
|
cb7fb9 |
case R_TILEPRO_IMM16_X0_TLS_GD_HA:
|
|
|
cb7fb9 |
case R_TILEPRO_IMM16_X1_TLS_GD_HA:
|
|
|
cb7fb9 |
if (need_relocs) {
|
|
|
cb7fb9 |
- outrel.r_offset = (htab->elf.sgot->output_section->vma
|
|
|
cb7fb9 |
- + htab->elf.sgot->output_offset + off);
|
|
|
cb7fb9 |
+ outrel.r_offset = (htab->sgot->output_section->vma
|
|
|
cb7fb9 |
+ + htab->sgot->output_offset + off);
|
|
|
cb7fb9 |
outrel.r_addend = 0;
|
|
|
cb7fb9 |
outrel.r_info = ELF32_R_INFO (indx, R_TILEPRO_TLS_DTPMOD32);
|
|
|
cb7fb9 |
- bfd_put_32 (output_bfd, 0, htab->elf.sgot->contents + off);
|
|
|
cb7fb9 |
- tilepro_elf_append_rela_32 (output_bfd, htab->elf.srelgot,
|
|
|
cb7fb9 |
+ bfd_put_32 (output_bfd, 0, htab->sgot->contents + off);
|
|
|
cb7fb9 |
+ tilepro_elf_append_rela_32 (output_bfd, htab->srelgot,
|
|
|
cb7fb9 |
&outrel);
|
|
|
cb7fb9 |
if (indx == 0)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
BFD_ASSERT (! unresolved_reloc);
|
|
|
cb7fb9 |
bfd_put_32 (output_bfd,
|
|
|
cb7fb9 |
relocation - dtpoff_base (info),
|
|
|
cb7fb9 |
- (htab->elf.sgot->contents + off +
|
|
|
cb7fb9 |
+ (htab->sgot->contents + off +
|
|
|
cb7fb9 |
TILEPRO_BYTES_PER_WORD));
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
else
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
bfd_put_32 (output_bfd, 0,
|
|
|
cb7fb9 |
- (htab->elf.sgot->contents + off +
|
|
|
cb7fb9 |
+ (htab->sgot->contents + off +
|
|
|
cb7fb9 |
TILEPRO_BYTES_PER_WORD));
|
|
|
cb7fb9 |
outrel.r_info = ELF32_R_INFO (indx,
|
|
|
cb7fb9 |
R_TILEPRO_TLS_DTPOFF32);
|
|
|
cb7fb9 |
outrel.r_offset += TILEPRO_BYTES_PER_WORD;
|
|
|
cb7fb9 |
tilepro_elf_append_rela_32 (output_bfd,
|
|
|
cb7fb9 |
- htab->elf.srelgot, &outrel);
|
|
|
cb7fb9 |
+ htab->srelgot, &outrel);
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
@@ -3249,9 +3241,9 @@ tilepro_elf_relocate_section (bfd *outpu
|
|
|
cb7fb9 |
symbol binding locally. Mark it as belonging
|
|
|
cb7fb9 |
to module 1, the executable. */
|
|
|
cb7fb9 |
bfd_put_32 (output_bfd, 1,
|
|
|
cb7fb9 |
- htab->elf.sgot->contents + off );
|
|
|
cb7fb9 |
+ htab->sgot->contents + off );
|
|
|
cb7fb9 |
bfd_put_32 (output_bfd, relocation - dtpoff_base (info),
|
|
|
cb7fb9 |
- htab->elf.sgot->contents + off +
|
|
|
cb7fb9 |
+ htab->sgot->contents + off +
|
|
|
cb7fb9 |
TILEPRO_BYTES_PER_WORD);
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
break;
|
|
|
cb7fb9 |
@@ -3411,7 +3403,7 @@ tilepro_elf_finish_dynamic_symbol (bfd *
|
|
|
cb7fb9 |
struct elf_link_hash_entry *h,
|
|
|
cb7fb9 |
Elf_Internal_Sym *sym)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- struct tilepro_elf_link_hash_table *htab;
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
htab = tilepro_elf_hash_table (info);
|
|
|
cb7fb9 |
BFD_ASSERT (htab != NULL);
|
|
|
cb7fb9 |
@@ -3431,9 +3423,9 @@ tilepro_elf_finish_dynamic_symbol (bfd *
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
BFD_ASSERT (h->dynindx != -1);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- splt = htab->elf.splt;
|
|
|
cb7fb9 |
- srela = htab->elf.srelplt;
|
|
|
cb7fb9 |
- sgotplt = htab->elf.sgotplt;
|
|
|
cb7fb9 |
+ splt = htab->splt;
|
|
|
cb7fb9 |
+ srela = htab->srelplt;
|
|
|
cb7fb9 |
+ sgotplt = htab->sgotplt;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
if (splt == NULL || srela == NULL)
|
|
|
cb7fb9 |
abort ();
|
|
|
cb7fb9 |
@@ -3481,8 +3473,8 @@ tilepro_elf_finish_dynamic_symbol (bfd *
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* This symbol has an entry in the GOT. Set it up. */
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- sgot = htab->elf.sgot;
|
|
|
cb7fb9 |
- srela = htab->elf.srelgot;
|
|
|
cb7fb9 |
+ sgot = htab->sgot;
|
|
|
cb7fb9 |
+ srela = htab->srelgot;
|
|
|
cb7fb9 |
BFD_ASSERT (sgot != NULL && srela != NULL);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
rela.r_offset = (sgot->output_section->vma
|
|
|
cb7fb9 |
@@ -3528,16 +3520,16 @@ tilepro_elf_finish_dynamic_symbol (bfd *
|
|
|
cb7fb9 |
+ h->root.u.def.section->output_offset);
|
|
|
cb7fb9 |
rela.r_info = ELF32_R_INFO (h->dynindx, R_TILEPRO_COPY);
|
|
|
cb7fb9 |
rela.r_addend = 0;
|
|
|
cb7fb9 |
- if (h->root.u.def.section == htab->elf.sdynrelro)
|
|
|
cb7fb9 |
- s = htab->elf.sreldynrelro;
|
|
|
cb7fb9 |
+ if (h->root.u.def.section == htab->sdynrelro)
|
|
|
cb7fb9 |
+ s = htab->sreldynrelro;
|
|
|
cb7fb9 |
else
|
|
|
cb7fb9 |
- s = htab->elf.srelbss;
|
|
|
cb7fb9 |
+ s = htab->srelbss;
|
|
|
cb7fb9 |
tilepro_elf_append_rela_32 (output_bfd, s, &rela);
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Mark some specially defined symbols as absolute. */
|
|
|
cb7fb9 |
- if (h == htab->elf.hdynamic
|
|
|
cb7fb9 |
- || (h == htab->elf.hgot || h == htab->elf.hplt))
|
|
|
cb7fb9 |
+ if (h == htab->hdynamic
|
|
|
cb7fb9 |
+ || (h == htab->hgot || h == htab->hplt))
|
|
|
cb7fb9 |
sym->st_shndx = SHN_ABS;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
return TRUE;
|
|
|
cb7fb9 |
@@ -3551,7 +3543,7 @@ tilepro_finish_dyn (bfd *output_bfd, str
|
|
|
cb7fb9 |
asection *splt ATTRIBUTE_UNUSED)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
Elf32_External_Dyn *dyncon, *dynconend;
|
|
|
cb7fb9 |
- struct tilepro_elf_link_hash_table *htab;
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
htab = tilepro_elf_hash_table (info);
|
|
|
cb7fb9 |
BFD_ASSERT (htab != NULL);
|
|
|
cb7fb9 |
@@ -3567,15 +3559,15 @@ tilepro_finish_dyn (bfd *output_bfd, str
|
|
|
cb7fb9 |
switch (dyn.d_tag)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
case DT_PLTGOT:
|
|
|
cb7fb9 |
- s = htab->elf.sgotplt;
|
|
|
cb7fb9 |
+ s = htab->sgotplt;
|
|
|
cb7fb9 |
dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
|
|
|
cb7fb9 |
break;
|
|
|
cb7fb9 |
case DT_JMPREL:
|
|
|
cb7fb9 |
- s = htab->elf.srelplt;
|
|
|
cb7fb9 |
+ s = htab->srelplt;
|
|
|
cb7fb9 |
dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
|
|
|
cb7fb9 |
break;
|
|
|
cb7fb9 |
case DT_PLTRELSZ:
|
|
|
cb7fb9 |
- s = htab->elf.srelplt;
|
|
|
cb7fb9 |
+ s = htab->srelplt;
|
|
|
cb7fb9 |
dyn.d_un.d_val = s->size;
|
|
|
cb7fb9 |
break;
|
|
|
cb7fb9 |
default:
|
|
|
cb7fb9 |
@@ -3593,11 +3585,11 @@ tilepro_elf_finish_dynamic_sections (bfd
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
bfd *dynobj;
|
|
|
cb7fb9 |
asection *sdyn;
|
|
|
cb7fb9 |
- struct tilepro_elf_link_hash_table *htab;
|
|
|
cb7fb9 |
+ struct elf_link_hash_table *htab;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
htab = tilepro_elf_hash_table (info);
|
|
|
cb7fb9 |
BFD_ASSERT (htab != NULL);
|
|
|
cb7fb9 |
- dynobj = htab->elf.dynobj;
|
|
|
cb7fb9 |
+ dynobj = htab->dynobj;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
sdyn = bfd_get_linker_section (dynobj, ".dynamic");
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
@@ -3606,7 +3598,7 @@ tilepro_elf_finish_dynamic_sections (bfd
|
|
|
cb7fb9 |
asection *splt;
|
|
|
cb7fb9 |
bfd_boolean ret;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- splt = htab->elf.splt;
|
|
|
cb7fb9 |
+ splt = htab->splt;
|
|
|
cb7fb9 |
BFD_ASSERT (splt != NULL && sdyn != NULL);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
ret = tilepro_finish_dyn (output_bfd, info, dynobj, sdyn, splt);
|
|
|
cb7fb9 |
@@ -3627,42 +3619,42 @@ tilepro_elf_finish_dynamic_sections (bfd
|
|
|
cb7fb9 |
= PLT_ENTRY_SIZE;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (htab->elf.sgotplt)
|
|
|
cb7fb9 |
+ if (htab->sgotplt)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- if (bfd_is_abs_section (htab->elf.sgotplt->output_section))
|
|
|
cb7fb9 |
+ if (bfd_is_abs_section (htab->sgotplt->output_section))
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
_bfd_error_handler
|
|
|
cb7fb9 |
- (_("discarded output section: `%pA'"), htab->elf.sgotplt);
|
|
|
cb7fb9 |
+ (_("discarded output section: `%pA'"), htab->sgotplt);
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (htab->elf.sgotplt->size > 0)
|
|
|
cb7fb9 |
+ if (htab->sgotplt->size > 0)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* Write the first two entries in .got.plt, needed for the dynamic
|
|
|
cb7fb9 |
linker. */
|
|
|
cb7fb9 |
bfd_put_32 (output_bfd, (bfd_vma) -1,
|
|
|
cb7fb9 |
- htab->elf.sgotplt->contents);
|
|
|
cb7fb9 |
+ htab->sgotplt->contents);
|
|
|
cb7fb9 |
bfd_put_32 (output_bfd, (bfd_vma) 0,
|
|
|
cb7fb9 |
- htab->elf.sgotplt->contents + GOT_ENTRY_SIZE);
|
|
|
cb7fb9 |
+ htab->sgotplt->contents + GOT_ENTRY_SIZE);
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- elf_section_data (htab->elf.sgotplt->output_section)->this_hdr.sh_entsize
|
|
|
cb7fb9 |
+ elf_section_data (htab->sgotplt->output_section)->this_hdr.sh_entsize
|
|
|
cb7fb9 |
= GOT_ENTRY_SIZE;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- if (htab->elf.sgot)
|
|
|
cb7fb9 |
+ if (htab->sgot)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- if (htab->elf.sgot->size > 0)
|
|
|
cb7fb9 |
+ if (htab->sgot->size > 0)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* Set the first entry in the global offset table to the address of
|
|
|
cb7fb9 |
the dynamic section. */
|
|
|
cb7fb9 |
bfd_vma val = (sdyn ?
|
|
|
cb7fb9 |
sdyn->output_section->vma + sdyn->output_offset :
|
|
|
cb7fb9 |
0);
|
|
|
cb7fb9 |
- bfd_put_32 (output_bfd, val, htab->elf.sgot->contents);
|
|
|
cb7fb9 |
+ bfd_put_32 (output_bfd, val, htab->sgot->contents);
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize
|
|
|
cb7fb9 |
+ elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize
|
|
|
cb7fb9 |
= GOT_ENTRY_SIZE;
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf64-ppc.c binutils-2.35/bfd/elf64-ppc.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf64-ppc.c 2020-07-30 15:04:05.363466721 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf64-ppc.c 2020-07-30 15:04:16.716393902 +0100
|
|
|
cb7fb9 |
@@ -3250,9 +3250,6 @@ struct ppc_link_hash_table
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Incremented every time we size stubs. */
|
|
|
cb7fb9 |
unsigned int stub_iteration;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
};
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Rename some of the generic section flags to better document how they
|
|
|
cb7fb9 |
@@ -4383,7 +4380,8 @@ ppc64_elf_before_check_relocs (bfd *ibfd
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
asection *s;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ibfd, r_symndx);
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, ibfd,
|
|
|
cb7fb9 |
+ r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
if (elf_section_data (opd)->relocs != relocs)
|
|
|
cb7fb9 |
@@ -4684,7 +4682,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
else
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
- Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -4955,7 +4953,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -5231,7 +5229,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
|
|
|
cb7fb9 |
void *vpp;
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf64-s390.c binutils-2.35/bfd/elf64-s390.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf64-s390.c 2020-07-30 15:04:05.369466683 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf64-s390.c 2020-07-30 15:04:16.716393902 +0100
|
|
|
cb7fb9 |
@@ -663,9 +663,6 @@ struct elf_s390_link_hash_table
|
|
|
cb7fb9 |
bfd_vma offset;
|
|
|
cb7fb9 |
} tls_ldm_got;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* Options passed from the linker. */
|
|
|
cb7fb9 |
struct s390_elf_params *params;
|
|
|
cb7fb9 |
};
|
|
|
cb7fb9 |
@@ -852,7 +849,7 @@ elf_s390_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
if (r_symndx < symtab_hdr->sh_info)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* A local symbol. */
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -1216,7 +1213,7 @@ elf_s390_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
asection *s;
|
|
|
cb7fb9 |
void *vpp;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -2258,7 +2255,7 @@ elf_s390_relocate_section (bfd *output_b
|
|
|
cb7fb9 |
& 0xff00f000) == 0xe300c000
|
|
|
cb7fb9 |
&& bfd_get_8 (input_bfd,
|
|
|
cb7fb9 |
contents + rel->r_offset + 3) == 0x04))
|
|
|
cb7fb9 |
- && (isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ && (isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
input_bfd, r_symndx))
|
|
|
cb7fb9 |
&& isym->st_shndx != SHN_ABS
|
|
|
cb7fb9 |
&& h != htab->elf.hdynamic
|
|
|
cb7fb9 |
@@ -3572,7 +3569,7 @@ elf_s390_finish_dynamic_sections (bfd *o
|
|
|
cb7fb9 |
if (local_plt[i].plt.offset != (bfd_vma) -1)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
asection *sec = local_plt[i].sec;
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ibfd, i);
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, ibfd, i);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elf64-x86-64.c binutils-2.35/bfd/elf64-x86-64.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elf64-x86-64.c 2020-07-30 15:04:05.365466709 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elf64-x86-64.c 2020-07-30 15:04:16.717393895 +0100
|
|
|
cb7fb9 |
@@ -1371,7 +1371,7 @@ elf_x86_64_tls_transition (struct bfd_li
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
name = bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL);
|
|
|
cb7fb9 |
}
|
|
|
cb7fb9 |
@@ -1559,7 +1559,7 @@ elf_x86_64_convert_load_reloc (bfd *abfd
|
|
|
cb7fb9 |
if (h == NULL)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym
|
|
|
cb7fb9 |
- = bfd_sym_from_r_symndx (&htab->sym_cache, abfd, r_symndx);
|
|
|
cb7fb9 |
+ = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Skip relocation against undefined symbols. */
|
|
|
cb7fb9 |
if (isym->st_shndx == SHN_UNDEF)
|
|
|
cb7fb9 |
@@ -1907,7 +1907,7 @@ elf_x86_64_check_relocs (bfd *abfd, stru
|
|
|
cb7fb9 |
if (r_symndx < symtab_hdr->sh_info)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* A local symbol. */
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
goto error_return;
|
|
|
cb7fb9 |
@@ -2308,7 +2308,7 @@ elf_x86_64_check_relocs (bfd *abfd, stru
|
|
|
cb7fb9 |
asection *s;
|
|
|
cb7fb9 |
void **vpp;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
goto error_return;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.35/bfd/elfnn-aarch64.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elfnn-aarch64.c 2020-07-30 15:04:05.371466670 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elfnn-aarch64.c 2020-07-30 15:04:16.717393895 +0100
|
|
|
cb7fb9 |
@@ -2643,9 +2643,6 @@ struct elf_aarch64_link_hash_table
|
|
|
cb7fb9 |
/* The bytes of the subsequent PLT entry. */
|
|
|
cb7fb9 |
const bfd_byte *plt_entry;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* For convenience in allocate_dynrelocs. */
|
|
|
cb7fb9 |
bfd *obfd;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
@@ -7611,7 +7608,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, s
|
|
|
cb7fb9 |
if (r_symndx < symtab_hdr->sh_info)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* A local symbol. */
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
@@ -7838,7 +7835,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, s
|
|
|
cb7fb9 |
asection *s;
|
|
|
cb7fb9 |
void **vpp;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
Only in binutils-2.35/bfd: elfnn-aarch64.c.orig
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elfnn-riscv.c binutils-2.35/bfd/elfnn-riscv.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elfnn-riscv.c 2020-07-30 15:04:05.365466709 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elfnn-riscv.c 2020-07-30 15:04:16.718393889 +0100
|
|
|
cb7fb9 |
@@ -113,9 +113,6 @@ struct riscv_elf_link_hash_table
|
|
|
cb7fb9 |
/* Short-cuts to get to dynamic linker sections. */
|
|
|
cb7fb9 |
asection *sdyntdata;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym to section mapping cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* The max alignment of output sections. */
|
|
|
cb7fb9 |
bfd_vma max_alignment;
|
|
|
cb7fb9 |
};
|
|
|
cb7fb9 |
@@ -681,7 +678,7 @@ riscv_elf_check_relocs (bfd *abfd, struc
|
|
|
cb7fb9 |
void *vpp;
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elfxx-mips.c binutils-2.35/bfd/elfxx-mips.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elfxx-mips.c 2020-07-30 15:04:05.376466638 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elfxx-mips.c 2020-07-30 15:04:16.719393882 +0100
|
|
|
cb7fb9 |
@@ -527,9 +527,6 @@ struct mips_elf_link_hash_table
|
|
|
cb7fb9 |
returns null. */
|
|
|
cb7fb9 |
asection *(*add_stub_section) (const char *, asection *, asection *);
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* Is the PLT header compressed? */
|
|
|
cb7fb9 |
unsigned int plt_header_is_comp : 1;
|
|
|
cb7fb9 |
};
|
|
|
cb7fb9 |
@@ -4401,7 +4398,7 @@ mips_elf_resolve_got_page_ref (void **re
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
/* Read in the symbol. */
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache, ref->u.abfd,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, ref->u.abfd,
|
|
|
cb7fb9 |
ref->symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elfxx-sparc.c binutils-2.35/bfd/elfxx-sparc.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elfxx-sparc.c 2020-07-30 15:04:05.360466741 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elfxx-sparc.c 2020-07-30 15:04:16.719393882 +0100
|
|
|
cb7fb9 |
@@ -1391,7 +1391,8 @@ _bfd_sparc_elf_check_relocs (bfd *abfd,
|
|
|
cb7fb9 |
if (r_symndx < symtab_hdr->sh_info)
|
|
|
cb7fb9 |
{
|
|
|
cb7fb9 |
/* A local symbol. */
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache, abfd, r_symndx);
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd,
|
|
|
cb7fb9 |
+ r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elfxx-sparc.h binutils-2.35/bfd/elfxx-sparc.h
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elfxx-sparc.h 2020-07-30 15:04:05.367466696 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elfxx-sparc.h 2020-07-30 15:04:16.719393882 +0100
|
|
|
cb7fb9 |
@@ -55,9 +55,6 @@ struct _bfd_sparc_elf_link_hash_table
|
|
|
cb7fb9 |
bfd_vma offset;
|
|
|
cb7fb9 |
} tls_ldm_got;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* Used by local STT_GNU_IFUNC symbols. */
|
|
|
cb7fb9 |
htab_t loc_hash_table;
|
|
|
cb7fb9 |
void *loc_hash_memory;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elfxx-tilegx.c binutils-2.35/bfd/elfxx-tilegx.c
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elfxx-tilegx.c 2020-07-30 15:04:05.362466728 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elfxx-tilegx.c 2020-07-30 15:04:16.719393882 +0100
|
|
|
cb7fb9 |
@@ -835,9 +835,6 @@ struct tilegx_elf_link_hash_table
|
|
|
cb7fb9 |
/* Whether LE transition has been disabled for some of the
|
|
|
cb7fb9 |
sections. */
|
|
|
cb7fb9 |
bfd_boolean disable_le_transition;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
- /* Small local sym to section mapping cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
};
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
@@ -1979,7 +1976,7 @@ tilegx_elf_check_relocs (bfd *abfd, stru
|
|
|
cb7fb9 |
void *vpp;
|
|
|
cb7fb9 |
Elf_Internal_Sym *isym;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
|
|
cb7fb9 |
+ isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache,
|
|
|
cb7fb9 |
abfd, r_symndx);
|
|
|
cb7fb9 |
if (isym == NULL)
|
|
|
cb7fb9 |
return FALSE;
|
|
|
cb7fb9 |
diff -rup binutils.orig/bfd/elfxx-x86.h binutils-2.35/bfd/elfxx-x86.h
|
|
|
cb7fb9 |
--- binutils.orig/bfd/elfxx-x86.h 2020-07-30 15:04:05.378466625 +0100
|
|
|
cb7fb9 |
+++ binutils-2.35/bfd/elfxx-x86.h 2020-07-30 15:04:16.720393876 +0100
|
|
|
cb7fb9 |
@@ -468,9 +468,6 @@ struct elf_x86_link_hash_table
|
|
|
cb7fb9 |
/* The amount of space used by the jump slots in the GOT. */
|
|
|
cb7fb9 |
bfd_vma sgotplt_jump_table_size;
|
|
|
cb7fb9 |
|
|
|
cb7fb9 |
- /* Small local sym cache. */
|
|
|
cb7fb9 |
- struct sym_cache sym_cache;
|
|
|
cb7fb9 |
-
|
|
|
cb7fb9 |
/* _TLS_MODULE_BASE_ symbol. */
|
|
|
cb7fb9 |
struct bfd_link_hash_entry *tls_module_base;
|
|
|
cb7fb9 |
|