diff options
author | Michael Matz <matz@suse.de> | 2022-11-16 16:28:01 +0100 |
---|---|---|
committer | Michael Matz <matz@suse.de> | 2022-11-30 17:15:08 +0100 |
commit | 885d86436c3f9ab0a13f39647860b526faa92cf8 (patch) | |
tree | fe346537ae1d7719d95c2f08c734a032820db9eb /ld/ldlang.c | |
parent | d7791499120d1ca92775bc63319af3165af30447 (diff) | |
download | fsf-binutils-gdb-885d86436c3f9ab0a13f39647860b526faa92cf8.zip fsf-binutils-gdb-885d86436c3f9ab0a13f39647860b526faa92cf8.tar.gz fsf-binutils-gdb-885d86436c3f9ab0a13f39647860b526faa92cf8.tar.bz2 |
section-select: Fix exclude-file-3
this testcase wasn't correctly testing everything, it passed, even
though sections from an excluded file were included. Fixing this
reveals a problem in the new section selector. This fixes that as
well.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index 2dfc420..d873adb 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -422,6 +422,10 @@ walk_wild_section_match (lang_wild_statement_type *ptr, return; } + /* If filename is excluded we're done. */ + if (walk_wild_file_in_exclude_list (ptr->exclude_name_list, file)) + return; + /* Check section name against each wildcard spec. If there's no wildcard all sections match. */ sec = ptr->section_list; @@ -920,9 +924,6 @@ resolve_wilds (void) LANG_FOR_EACH_INPUT_STATEMENT (f) { //printf("XXX %s\n", f->filename); - /* XXX if (walk_wild_file_in_exclude_list (s->exclude_name_list, f)) - return;*/ - if (f->the_bfd == NULL || !bfd_check_format (f->the_bfd, bfd_archive)) resolve_wild_sections (f); |