aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 32450fb..8cbeda6 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -7488,7 +7488,7 @@ lang_reset_memory_regions (void)
static void
gc_section_callback (lang_wild_statement_type *ptr,
- struct wildcard_list *sec ATTRIBUTE_UNUSED,
+ struct wildcard_list *sec,
asection *section,
struct flag_info *sflag_info ATTRIBUTE_UNUSED,
lang_input_statement_type *file ATTRIBUTE_UNUSED,
@@ -7498,6 +7498,8 @@ gc_section_callback (lang_wild_statement_type *ptr,
should be as well. */
if (ptr->keep_sections)
section->flags |= SEC_KEEP;
+ if (sec)
+ section->pattern = sec->spec.name;
}
/* Iterate over sections marking them against GC. */