From cb5cf5e26ea2e42937a2ce1b662e61e4772ba6f9 Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Tue, 21 Jul 2015 12:42:07 -0700 Subject: Fix internal error when linking an archive library with no preceding objects. gold/ PR gold/18696 * archive.cc (Library_base::should_include_member): Don't use entry point for relocatable links, or if target is not yet valid. * parameters.cc (Parameters::entry): Check target_valid(). --- gold/parameters.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gold/parameters.cc') diff --git a/gold/parameters.cc b/gold/parameters.cc index 8eab000..5ed1912 100644 --- a/gold/parameters.cc +++ b/gold/parameters.cc @@ -237,7 +237,7 @@ const char* Parameters::entry() const { const char* ret = this->options().entry(); - if (ret == NULL) + if (ret == NULL && parameters->target_valid()) ret = parameters->target().entry_symbol_name(); return ret; } -- cgit v1.1