Bug 28195 - gold: Spurious "warning: wildcard match appears in both version"
Summary: gold: Spurious "warning: wildcard match appears in both version"
Status: UNCONFIRMED
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Cary Coutant
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-05 17:00 UTC by Fangrui Song
Modified: 2021-08-05 17:00 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fangrui Song 2021-08-05 17:00:14 UTC
cat > ./a.s <<eof
.symver aa_2_29, aa@GLIBC_2.29
.globl aa_2_29
aa_2_29:
  nop

.symver bb_2_30, aa@GLIBC_2.30
.globl bb_2_30
aa_2_30:
  nop
eof
cat > ./a.ver <<eof
GLIBC_2.29 { local: *; };
GLIBC_2.30 { local: *; };
eof
cc -c a.s


% gold --version-script a.ver a.o -shared
gold: warning: wildcard match appears in both version 'GLIBC_2.29' and 'GLIBC_2.30' in script

The example is derived from glibc. I think the warning should be suppressed: GLIBC_2.29 { global: xxx; yyy; local: *; };  can be used to keep xxx@GLIBC_2.29 yyy@GLIBC_2.29 while localizing other *@GLIBC_2.29 non-default version symbols. It's perfectly fine for multiple version nodes to localize their non-default version symbols.