NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/52675: crunching binaries improperly removes PaX notes

I think that we should just stop trying to remove the notes. The mcmodel note is just used on sparc64 to enable topdown vm, and the pax note is always 0 on the standard rescue built binaries. If one wants to fix new crunched binaries that were built with inconsistent pax note settings, one call paxctl(1) to adjust the the pax note settings. One we create another tool to adjust mcmodel. Removing the notes makes the situation strictly worse because objcopy(1) zeros out the note sections completely instead of actually moving the notes around so there are no gaps. The kernel loader reads the program header notes section and loses track where it is because it can't calculate the size of the zeroed notes. Of course the kernel can be modified to scan the section headers instead, or we can inject fake contents to the zeroed out sections, but isn't it better to leave them alone in the first place, and provide tools to modify them (we have one for pax, we can add one for mcmodel if that's necessary).


Home | Main Index | Thread Index | Old Index