Clarify STAPDT vs STAPSDT note handling in readelf
Corrects error messages and internal labels in readelf when processing STAPSDT notes.
The readelf utility previously confused ‘stapdt’ and ‘stapsdt’ sections, leading to misleading error messages for malformed notes. This commit clarifies the distinction by renaming an internal label and correcting the error message to accurately reflect that the note is too small for STAPSDT processing. This resolves PR 34419.
In Details
In binutils/readelf.c, the print_stapsdt_note function's internal error handling was unified under a single too_small label, previously stapdt_note_too_small. This change corrects the error reporting for malformed Elf_Internal_Note structures when they are too small to contain the expected STAPSDT data, aligning the diagnostic with the specific note type being processed.
- readelf
- A command-line utility that displays information about ELF (Executable and Linkable Format) files. It can show sections, symbols, relocation entries, and other details.
- STAPSDT
- SystemTap dynamic tracing. A facility that allows users to dynamically instrument running Linux kernel or userspace programs to gather detailed performance and operational data.
- ELF
- Executable and Linkable Format. A standard file format for executables, object code, shared libraries, and core dumps on Unix-like systems.
- note
- A section type in ELF files that contains arbitrary metadata. Tools like readelf can parse specific note types, such as those used for debugging or tracing information.