aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-02-27 22:38:18 +0000
committerIan Lance Taylor <iant@google.com>2008-02-27 22:38:18 +0000
commit7019cd256559b48bc642fcb8ff9a4ea9e98bced7 (patch)
treec88847678e9c212b482d4a30beccdd74abdd90c6 /gold/layout.cc
parent20b4711e0556d73b7a16250447ee5ca505b834db (diff)
downloadgdb-7019cd256559b48bc642fcb8ff9a4ea9e98bced7.zip
gdb-7019cd256559b48bc642fcb8ff9a4ea9e98bced7.tar.gz
gdb-7019cd256559b48bc642fcb8ff9a4ea9e98bced7.tar.bz2
Implement -q/--emit-relocs.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index 6685156..e8c6c66 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -155,8 +155,10 @@ Layout::include_section(Sized_relobj<size, big_endian>*, const char* name,
case elfcpp::SHT_RELA:
case elfcpp::SHT_REL:
case elfcpp::SHT_GROUP:
- // For a relocatable link these should be handled elsewhere.
- gold_assert(!parameters->output_is_object());
+ // If we are emitting relocations these should be handled
+ // elsewhere.
+ gold_assert(!parameters->output_is_object()
+ && !parameters->emit_relocs());
return false;
case elfcpp::SHT_PROGBITS:
@@ -370,7 +372,7 @@ Layout::layout_reloc(Sized_relobj<size, big_endian>* object,
Output_section* data_section,
Relocatable_relocs* rr)
{
- gold_assert(parameters->output_is_object());
+ gold_assert(parameters->output_is_object() || parameters->emit_relocs());
int sh_type = shdr.get_sh_type();