diff options
author | Alan Modra <amodra@bigpond.net.au> | 2003-02-04 12:49:57 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2003-02-04 12:49:57 +0000 |
commit | c50be2b5797edde9703c579fe82ecbf61f0d1c8f (patch) | |
tree | 2cf97c447de8a3a6b0fdd52f297fd04b2a47aa78 /bfd/elflink.h | |
parent | 92c4da53e196713256db6d6133bfc775a40a063b (diff) | |
download | gdb-c50be2b5797edde9703c579fe82ecbf61f0d1c8f.tar.gz |
* 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.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h index aa359a18eb9..a70f873af6a 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; } |