diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2002-01-31 10:46:24 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2002-01-31 10:46:24 +0000 |
commit | e5dfef09182bd9e1523f6bc5e9a44e60171ff3c8 (patch) | |
tree | 9b583bc0b8249db5253f36b0aa610cf7cc53fb23 /bfd/elf32-cris.c | |
parent | f7a2c2f698acd6554284d5e05a1f82724c306359 (diff) | |
download | gdb-e5dfef09182bd9e1523f6bc5e9a44e60171ff3c8.zip gdb-e5dfef09182bd9e1523f6bc5e9a44e60171ff3c8.tar.gz gdb-e5dfef09182bd9e1523f6bc5e9a44e60171ff3c8.tar.bz2 |
* elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
unexport unreferenced symbols when --export-dynamic. Call
_bfd_elf_strtab_delref when unexporting.
Diffstat (limited to 'bfd/elf32-cris.c')
-rw-r--r-- | bfd/elf32-cris.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index 6feb292..c588adc 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -2936,8 +2936,14 @@ elf_cris_discard_excess_program_dynamics (h, inf) /* If the locally-defined symbol isn't used by a DSO, then we don't have to export it as a dynamic symbol. This was already done for functions; doing this for all symbols would presumably not - introduce new problems. */ - h->root.dynindx = -1; + introduce new problems. Of course we don't do this if we're + exporting all dynamic symbols. */ + if (! info->export_dynamic) + { + h->root.dynindx = -1; + _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr, + h->root.dynstr_index); + } } return true; |