Closed rossburton closed 9 months ago
Thanks for letting know. If you feel up to it, submit a PR. If not, please share a minimal binary with those properties, and someone will get to it (eventually).
Here's a representative library:
I have most of a patch locally that I've been using and just needs a test case, but due to https://github.com/eliben/pyelftools/issues/524 I can't submit it.
Didn't keep other contributors from submitting PRs, myself included. :) I might be missing something legally.
Is that a representative binary or a minimal one? For the autotest purposes, we'd prefer a minimal one, and one with no risk of having proprietary code in it.
Is that a representative binary or a minimal one? For the autotest purposes, we'd prefer a minimal one, and one with no risk of having proprietary code in it.
Representative, because I had it to hand (it's from GNU attr).
Here's int main(void) { return 0;}
compiled with PAC/BTI:
The PR has landed. Is this still an issue?
So it looks like GitHub doesn't mail when issues are mentioned in PRs, so i didn't notice that PR at all!
$ python3 ./scripts/readelf.py /yocto/ross/build/tmp/sysroots-components/cortexa57/libice/usr/lib/libICE.so -n
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 (program properties)
Properties: aarch64 feature: bti, pac
That will do nicely, thanks.
The
.note.gnu.property
segment will contain GNU_PROPERTY_AARCH64_FEATURE_1_BTI and GNU_PROPERTY_AARCH64_FEATURE_1_PAC markers if the code is compiled with BTI/PAC enabled.readelf can dump these:
But pyelftools doesn't know how to parse the data.