[PATCH v1] PowerPC: Fix typo in PowerPC note pseudo-section names
Alan Modra
amodra@gmail.com
Thu Sep 25 21:31:13 GMT 2025
On Thu, Sep 25, 2025 at 01:04:57PM -0600, Tom Tromey wrote:
> >>>>> Abhay Kandpal via Gdb-testers <gdb-testers@sourceware.org> writes:
>
> CCing binutils.
>
> > The recent tidy-up commit 09e56f0515c3 ("Code tidy: bfd/elf.c:
> > Tidy up core note handling code.") introduced regressions in
> > the PowerPC core note handling. The pseudo-section names for
> > TM_CVSX, TM_SPR, VSX and VMX notes were defined with an
> > underscore instead of a hyphen, breaking GDB test cases.
>
> Thanks for the patch. I was able to confirm that this fixes a
> regression with core files on PPC.
>
> It looks like this is also needed on the gdb-17 branch.
>
>
> > #define NOTE_PSEUDO_SECTION_RISCV_CSR ".reg_riscv_csr"
>
> I noticed this bug also affects a couple other ports:
>
> #define NOTE_PSEUDO_SECTION_RISCV_CSR ".reg_riscv_csr"
> #define NOTE_PSEUDO_SECTION_S390_CTRS ".reg_s390_ctrs"
>
> Would you mind fixing these in your patch as well? It's clear from the
> original patch that these were also erroneously renamed:
>
> - return elfcore_make_note_pseudosection (abfd, ".reg-riscv-csr", note);
>
> - return elfcore_make_note_pseudosection (abfd, ".reg-s390-ctrs", note);
>
> FWIW this patch probably should have gone to the binutils list, since
> BFD stuff tends to be discussed there. However I'm glad you brought it
> to our attention, since now (1) we know it's needed for gdb-17, and (2)
> I was planning to look into the PPC core problem (we found it internally
> at AdaCore) and you've saved me the trouble :)
>
> Unclear if I can approve this but I think it's fairly obvious FWIW.
Yes, I agree this qualifies as obvious. I had Abhay's patch applied
locally last night but forgot to push it. I've now done so with the
RISV and S390 fixes.
--
Alan Modra
More information about the Binutils
mailing list