[llvm] [llvm-objdump] Add possibility to verify .note section format (PR #90458)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 21:18:51 PDT 2024


MaskRay wrote:

> This will need adding to the release notes.
> 
> @MaskRay: what's your opinion on whether this should be enabled by default? Enabling by default means that those who are accidentally creating invalid notes will be warned about it. On the other hand we'll break people's build, if they are deliberately creating invalid ones (I don't know why you would outside of testing). My inclination is on by default, since there's an easy way to get out of the situation with the new `--no-verify-note-sections` option.

objcopy's section/symbol removal/modification features can easily break linking or cause runtime failures, but it is pretty difficult for `--add-*` to cause failures.

The most probably `--add-section .notexxx=xxx` users are distributors.
Adding another option for verification could be perceived as annoyance.
The other users use `--add-section .notexxx=xxx` to deliberately create invalid files to another tool, which is probably niche.
These folks are likely more amenable to additional complexity.

I agree with you that verification can be on by default.


https://github.com/llvm/llvm-project/pull/90458


More information about the llvm-commits mailing list