summaryrefslogtreecommitdiff
path: root/bfd/elf32-cris.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2002-01-31 10:46:24 +0000
committerHans-Peter Nilsson <hp@axis.com>2002-01-31 10:46:24 +0000
commit8cf1a37185062ff6bcc37a481e2076ac46ce59b5 (patch)
treef9a081869f9a2578276e44fd5ff6c860bad59fb8 /bfd/elf32-cris.c
parentd12abf95b3dd8ab9fb2695b1d5e94c457b7c5ebd (diff)
downloadgdb-8cf1a37185062ff6bcc37a481e2076ac46ce59b5.tar.gz
* 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.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 6feb292c191..c588adcc48b 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;