diff options
author | Alan Modra <amodra@gmail.com> | 2017-04-27 11:06:33 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-04-27 11:54:29 +0930 |
commit | 641338d8e9b62bde9672f13f0dca2324b61e46e2 (patch) | |
tree | 1548ad68c51d8b24241e6717ef4b3766fa2e944b /bfd/elflink.c | |
parent | 21d68fcd0c2f9113369d860ee1e5841bfacc35ff (diff) | |
download | fsf-binutils-gdb-641338d8e9b62bde9672f13f0dca2324b61e46e2.zip fsf-binutils-gdb-641338d8e9b62bde9672f13f0dca2324b61e46e2.tar.gz fsf-binutils-gdb-641338d8e9b62bde9672f13f0dca2324b61e46e2.tar.bz2 |
Clear dynstr_index when forcing symbols local
This is really just cosmetic, but it does protect a little from
accidentally reading a stale value.
* elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
when force_local.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 73af763..59300b7 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -7295,9 +7295,10 @@ _bfd_elf_link_hash_hide_symbol (struct bfd_link_info *info, h->forced_local = 1; if (h->dynindx != -1) { - h->dynindx = -1; _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr, h->dynstr_index); + h->dynindx = -1; + h->dynstr_index = 0; } } } |