[PATCH] bfd/ELF: Skip the old note segment in illumos core file

Carsten Grzemba grzemba@contac-dt.de
Thu Sep 11 09:40:00 GMT 2025


On GDB I see problems with reading core files written on illumos (checked distros OmniosCE and Openindiana).
I could find out that the reason is the ancient structure of the illumos core files, which still contains an 2 decades old notes segment AND an new note segment. The proposed fix here is to skip the notes0 segment with the old proc content. The current core file content is described here:
https://www.illumos.org/man/5/core The proposed fix skips the notes0 segment. I tested this on GDB 16.3 source.
I do not know if the name "CORE" is still used by other OS's. So I still test for the name "CORE" and if there the content type NT_PRPSINFO exit the loop. Solaris 11.4 has removed the old segment already:
https://docs.oracle.com/cd/E88353_01/html/E37852/core-5.html says "Prior to Oracle Solaris 11.4, a core file contained two NOTE sections, the extra one containing structures defined in the obsolete <sys/old_procfs.h> header file for the old ioctl()-based /proc interface. Programs should recognize and skip this old NOTE segment. It can be recognized by the presence of entries with entry name "CORE" and with these note types:" More details was discussed first on
https://sourceware.org/bugzilla/show_bug.cgi?id=33258
-- 
Carsten Grzemba
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/binutils/attachments/20250911/74448fd8/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ignore-core-note0-segment.patch
Type: text/x-patch
Size: 923 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20250911/74448fd8/attachment-0001.bin>


More information about the Binutils mailing list