summaryrefslogtreecommitdiffstats
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-02-04 12:49:57 +0000
committerAlan Modra <amodra@gmail.com>2003-02-04 12:49:57 +0000
commit5cab59f6227cb9ef3e5ed2a5bf9df5d3836645b2 (patch)
tree1187ef2086919d41d343a00b4730c265baf49440 /bfd/elflink.h
parent68bfbfcc5aa8bda806bef9edf274059d6ad571fc (diff)
downloadppe42-binutils-5cab59f6227cb9ef3e5ed2a5bf9df5d3836645b2.tar.gz
ppe42-binutils-5cab59f6227cb9ef3e5ed2a5bf9df5d3836645b2.zip
* elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
(struct elf_link_hash_entry): Add "glist" and "plist" fields to "got" union, and declare as gotplt_union. Use gotplt_uinion for "plt" field. (struct elf_link_hash_table): Make "init_refcount" a gotplt_union. Add "init_offset" field. (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union. (elf_local_got_ents): Declare. * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got" and "plt". (_bfd_elf_link_hash_hide_symbol): Use "init_offset". (_bfd_elf_link_hash_table_init): Set "init_offset". * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount from init_offset. (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset. * elf.c (bfd_elf_local_sym_name): Split out from.. (group_signature): ..here. * elf-bfd.h (bfd_elf_local_sym_name): Declare.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index aa359a18eb..a70f873af6 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -2902,7 +2902,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
/* Any syms created from now on start with -1 in
got.refcount/offset and plt.refcount/offset. */
- elf_hash_table (info)->init_refcount = -1;
+ elf_hash_table (info)->init_refcount = elf_hash_table (info)->init_offset;
/* The backend may have to create some sections regardless of whether
we're dynamic or not. */
@@ -3909,10 +3909,13 @@ elf_adjust_dynamic_symbol (h, data)
bfd *dynobj;
struct elf_backend_data *bed;
+ if (! is_elf_hash_table (eif->info))
+ return FALSE;
+
if (h->root.type == bfd_link_hash_warning)
{
- h->plt.offset = (bfd_vma) -1;
- h->got.offset = (bfd_vma) -1;
+ h->plt = elf_hash_table (eif->info)->init_offset;
+ h->got = elf_hash_table (eif->info)->init_offset;
/* When warning symbols are created, they **replace** the "real"
entry in the hash table, thus we never get to see the real
@@ -3924,9 +3927,6 @@ elf_adjust_dynamic_symbol (h, data)
if (h->root.type == bfd_link_hash_indirect)
return TRUE;
- if (! is_elf_hash_table (eif->info))
- return FALSE;
-
/* Fix the symbol flags. */
if (! elf_fix_symbol_flags (h, eif))
return FALSE;
@@ -3944,7 +3944,7 @@ elf_adjust_dynamic_symbol (h, data)
|| ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0
&& (h->weakdef == NULL || h->weakdef->dynindx == -1))))
{
- h->plt.offset = (bfd_vma) -1;
+ h->plt = elf_hash_table (eif->info)->init_offset;
return TRUE;
}
OpenPOWER on IntegriCloud