summaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index f558e1c51ac..c37d7398d01 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -5801,7 +5801,10 @@ elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
|| info->emitrelocations
|| !is_elf_hash_table (info->hash)
|| elf_hash_table (info)->dynamic_sections_created)
- return TRUE;
+ {
+ (*_bfd_error_handler)(_("Warning: gc-sections option ignored"));
+ return TRUE;
+ }
/* Apply transitive closure to the vtable entry usage info. */
elf_link_hash_traverse (elf_hash_table (info),