Add support for -E/--export-dynamic. Also clean up --help output a bit.

This commit is contained in:
Ian Lance Taylor
2007-08-22 05:06:38 +00:00
parent 6b2d86bda4
commit a6badf5a97
4 changed files with 33 additions and 6 deletions

View File

@@ -1001,7 +1001,10 @@ Symbol_table::set_dynsym_indexes(const General_options* options,
// some symbols appear more than once in the symbol table, with
// and without a version.
if (!sym->needs_dynsym_entry())
if (!sym->needs_dynsym_entry()
&& (!options->export_dynamic()
|| !sym->in_reg()
|| !sym->is_externally_visible()))
sym->set_dynsym_index(-1U);
else if (!sym->has_dynsym_index())
{