[PATCH] readelf: Display and return true for empty note section/segment

H.J. Lu hjl.tools@gmail.com
Wed Jan 14 01:02:29 GMT 2026


Change readelf to display and return true for empty note section and
segment.  Add a linker test to verify that empty note section is
discarded.

binutils/

PR ld/33780
* readelf.c (process_notes_at): Display and return true for empty
note section and segment.

gas/

PR ld/33780
* testsuite/gas/elf/elf.exp: Run empty-note.
* testsuite/gas/elf/empty-note.d: New file.
* testsuite/gas/elf/empty-note.s: Likewise.

ld/

PR ld/33780
* testsuite/ld-elf/empty-note.d: New file.
* testsuite/ld-elf/empty-note.s: Likewise.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-readelf-Display-and-return-true-for-empty-note-secti.patch
Type: text/x-patch
Size: 5008 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20260114/efee46bb/attachment.bin>


More information about the Binutils mailing list