Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
(In reply to Florian Weimer from comment #0)
Hi Florian,
> gcc -Wall -O2 -shared -fpic t.c -Wl,--version-script t.lds
> gcc -flto -Wall -O2 -shared -fpic t.c -Wl,--version-script t.lds> /usr/bin/ld: /tmp/ccDIqhWD.ltrans0.ltrans.o: in function
> `OPENSSL_strcasecmp':
> <artificial>:(.text+0x0): multiple definition of `OPENSSL_strcasecmp'> Nick, does this look like a binutils issue to you?
Definitely. Well 90%. I suppose that there is a possibility that
this will turn out to be a bug in the lto plugin, rather than the
linker itself.
Would you mind filing this upstream ?
Cheers
Nick
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (binutils bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2023:2548
Package versions: binutils-2.35.2-24.el9.x86_64 gcc-11.3.1-2.1.el9.x86_64 This script produces a shared object with the expected alias: cat > t.c <<EOF int __attribute__ ((symver ("OPENSSL_strcasecmp.1"), symver ("OPENSSL_strcasecmp@@OPENSSL_3.0.3"))) OPENSSL_strcasecmp (const char *a, const char *b) { return 0; } EOF cat > t.lds <<EOF OPENSSL_3.0.1 { global: OPENSSL_strcasecmp; local: *; }; OPENSSL_3.0.3 { global: OPENSSL_strcasecmp; local: *; } OPENSSL_3.0.1; EOF gcc -Wall -O2 -shared -fpic t.c -Wl,--version-script t.lds But replacing the final command does not: gcc -flto -Wall -O2 -shared -fpic t.c -Wl,--version-script t.lds /usr/bin/ld: /tmp/ccDIqhWD.ltrans0.ltrans.o: in function `OPENSSL_strcasecmp': <artificial>:(.text+0x0): multiple definition of `OPENSSL_strcasecmp' /usr/bin/ld: /tmp/ccDIqhWD.ltrans0.ltrans.o:(*IND*+0x0): multiple definition of `OPENSSL_strcasecmp' collect2: error: ld returned 1 exit status The assembler difference from LTO non-LTO mode appears to be: .LFE0: .size OPENSSL_strcasecmp, .-OPENSSL_strcasecmp - .symver OPENSSL_strcasecmp, OPENSSL_strcasecmp.1 .symver OPENSSL_strcasecmp, OPENSSL_strcasecmp@@OPENSSL_3.0.3 + .symver OPENSSL_strcasecmp, OPENSSL_strcasecmp.1 .ident "GCC: (GNU) 11.3.1 20220421 (Red Hat 11.3.1-2)" .section .note.GNU-stack,"",@progbits And the symbol table order is similarly transposed: 7: 0000000000000000 0 SECTION LOCAL DEFAULT 4 8: 0000000000000000 3 FUNC GLOBAL DEFAULT 1 OPENSSL_strcasecmp - 9: 0000000000000000 3 FUNC GLOBAL DEFAULT 1 OPENSSL_strcasecmp@@OPENSSL_3.0.3 - 10: 0000000000000000 3 FUNC GLOBAL DEFAULT 1 OPENSSL_strcasecmp.1 + 9: 0000000000000000 3 FUNC GLOBAL DEFAULT 1 OPENSSL_strcasecmp.1 + 10: 0000000000000000 3 FUNC GLOBAL DEFAULT 1 OPENSSL_strcasecmp@@OPENSSL_3.0.3 I'm not sure if these are the differences that trigger the linker failure. Nick, does this look like a binutils issue to you?