aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index d4b9f18..356a664 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -3986,9 +3986,7 @@ Layout::finish_dynamic_section(const Input_objects* input_objects,
p != input_objects->dynobj_end();
++p)
{
- if (!(*p)->is_needed()
- && !(*p)->is_incremental()
- && (*p)->input_file()->options().as_needed())
+ if (!(*p)->is_needed() && (*p)->as_needed())
{
// This dynamic object was linked with --as-needed, but it
// is not needed.