diff options
author | Simon Glass <sjg@chromium.org> | 2023-10-23 00:52:43 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-11-02 22:38:01 -0400 |
commit | ad8dbabc22fa75163450bb81056f71befe02621f (patch) | |
tree | d7b09e7db0087d092ff5826bc127c4ba18b4ff30 /tools/buildman | |
parent | 1f46e8af429483e19fb337c9fcc2f443ae29a908 (diff) | |
download | u-boot-ad8dbabc22fa75163450bb81056f71befe02621f.tar.gz u-boot-ad8dbabc22fa75163450bb81056f71befe02621f.tar.bz2 u-boot-ad8dbabc22fa75163450bb81056f71befe02621f.zip |
buildman: Include symbols in the read-only data section
When symbols switch between the inited data section and the read-only
data section their visbility changes, at present, with the -B option.
This is confusing, since adding 'const' to a variable declaration can
make it look like a significant improvement in bloat. But in fact
nothing has changed.
Add 'r' to the list of symbols types that are recorded, to correct this
problem. Add a constant to make it easier to find this code next time.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools/buildman')
-rw-r--r-- | tools/buildman/builder.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index 5305477c5b..3e42c987d1 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -35,6 +35,10 @@ from u_boot_pylib.terminal import tprint # which indicates that BREAK_ME has an empty default RE_NO_DEFAULT = re.compile(b'\((\w+)\) \[] \(NEW\)') +# Symbol types which appear in the bloat feature (-B). Others are silently +# dropped when reading in the 'nm' output +NM_SYMBOL_TYPES = 'tTdDbBr' + """ Theory of Operation @@ -693,7 +697,7 @@ class Builder: parts = line.split() if line and len(parts) == 3: size, type, name = line.split() - if type in 'tTdDbB': + if type in NM_SYMBOL_TYPES: # function names begin with '.' on 64-bit powerpc if '.' in name[1:]: name = 'static.' + name.split('.')[0] |