Re: [PATCH] gas: Avoid section symbols as group signatures
Kirill A. Korinsky <[email protected]> Mon, 27 Jul 2026 18:56:04 +0200
| Newsgroups | gmane.comp.gnu.binutils |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 27 Jul 2026 13:04:47 +0200, "Kirill A. Korinsky" <[email protected]> wrote: > > When a COMDAT group signature matches its section name, > symbol_find_exact finds the existing section symbol. GAS then reuses > this unnamed STT_SECTION symbol as the group signature, although the > signature requires a distinct named symbol. > > Reject section symbols when selecting an existing signature; GAS then > creates the usual named local STT_NOTYPE symbol. > > This issue was discovered during the OpenBSD/sparc64 LLVM toolchain port > and the attempt to upstream its LLVM changes: > https://github.com/llvm/llvm-project/pull/207609 > > An LLD workaround for these objects was rejected upstream: > https://github.com/llvm/llvm-project/pull/209841 > > The LLD workaround was tested while building GCC 15.2.0 and GCC 16.1.0 > on OpenBSD/sparc64 with the LLVM toolchain. > --- > gas/config/obj-elf.c | 1 + > gas/testsuite/gas/elf/elf.exp | 1 + > gas/testsuite/gas/elf/group2.d | 8 ++++++++ > gas/testsuite/gas/elf/group2.s | 2 ++ > 4 files changed, 12 insertions(+) > create mode 100644 gas/testsuite/gas/elf/group2.d > create mode 100644 gas/testsuite/gas/elf/group2.s > I'd like to withdraw this patch because future tests proofs that it is not complete and still needs some LLD side workaround, or future work in GAS -- wbr, Kirill