aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-02-28 20:35:39 +0000
committerIan Lance Taylor <iant@google.com>2008-02-28 20:35:39 +0000
commit0dfbdef4c43cfe12bb3e2505ebe5acc651a35c98 (patch)
treefe965d8393ecdd9c81b7f29ff4ce89fdd79d92c6 /gold/symtab.cc
parentda769d5629564b82d4eec1b256ffc562d5c01624 (diff)
downloadgdb-0dfbdef4c43cfe12bb3e2505ebe5acc651a35c98.zip
gdb-0dfbdef4c43cfe12bb3e2505ebe5acc651a35c98.tar.gz
gdb-0dfbdef4c43cfe12bb3e2505ebe5acc651a35c98.tar.bz2
Support -d/--define-common.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r--gold/symtab.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc
index 25f1cab..cb2a798 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -1715,7 +1715,8 @@ Symbol_table::sized_finalize_symbol(Symbol* unsized_sym)
// FIXME: We need some target specific support here.
if (shndx >= elfcpp::SHN_LORESERVE
- && shndx != elfcpp::SHN_ABS)
+ && shndx != elfcpp::SHN_ABS
+ && shndx != elfcpp::SHN_COMMON)
{
gold_error(_("%s: unsupported symbol section 0x%x"),
sym->demangled_name().c_str(), shndx);
@@ -1730,7 +1731,7 @@ Symbol_table::sized_finalize_symbol(Symbol* unsized_sym)
}
else if (shndx == elfcpp::SHN_UNDEF)
value = 0;
- else if (shndx == elfcpp::SHN_ABS)
+ else if (shndx == elfcpp::SHN_ABS || shndx == elfcpp::SHN_COMMON)
value = sym->value();
else
{
@@ -1904,7 +1905,8 @@ Symbol_table::sized_write_globals(const Input_objects* input_objects,
// FIXME: We need some target specific support here.
if (in_shndx >= elfcpp::SHN_LORESERVE
- && in_shndx != elfcpp::SHN_ABS)
+ && in_shndx != elfcpp::SHN_ABS
+ && in_shndx != elfcpp::SHN_COMMON)
{
gold_error(_("%s: unsupported symbol section 0x%x"),
sym->demangled_name().c_str(), in_shndx);
@@ -1920,7 +1922,8 @@ Symbol_table::sized_write_globals(const Input_objects* input_objects,
shndx = elfcpp::SHN_UNDEF;
}
else if (in_shndx == elfcpp::SHN_UNDEF
- || in_shndx == elfcpp::SHN_ABS)
+ || in_shndx == elfcpp::SHN_ABS
+ || in_shndx == elfcpp::SHN_COMMON)
shndx = in_shndx;
else
{