aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
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();