This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 2/2] binutils: Add new GNU format mode to `size` utility
- From: Nick Clifton <nickc at redhat dot com>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 1 Feb 2019 15:44:33 +0000
- Subject: Re: [PATCH 2/2] binutils: Add new GNU format mode to `size` utility
- References: <cover.1548931650.git.andrew.burgess@embecosm.com> <274324e00d814e5fdbc598fd932a756bf88a1857.1548931650.git.andrew.burgess@embecosm.com> <00fef81e-9a8a-a005-f80e-a9ef35fc7259@redhat.com> <20190201120100.GC17699@embecosm.com>
Hi Andrew,
> That looks great, but does it allow filtering by section properties?
It does now. :-) For example:
% annocheck --disable-hardened --ignore-unknown --size-sec-flags=X /usr/bin --size-human
Section Size: 6794 sections match flag requirements, total size: 152Mb
You can combine W, A and X for the required section flags, and a ! character
inverts the following flags, so --size-sec-flags=A!WX would match any section
that allocates space in memory but which is neither writeable nor executable.
(IE .rodata and the like).
You can also match segments instead of sections with the --size-seg-flags=[!WRX]
option.
You need annobin 8.70 for this enhancement, which should be in rawhide now,
but you can also clone the sources if you prefer:
git clone git://sourceware.org/git/annobin.git
Cheers
Nick