summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorjan <jan.vermaete@gmail.com>2020-05-07 15:25:36 +0200
committerSteve Sakoman <steve@sakoman.com>2020-05-11 06:15:02 -1000
commit8a883c3b0773960908491c03c46e7ed320e41dc5 (patch)
treea6de604657880e5f00caf19191e3d101a0db2bcd /scripts
parentfcd6c105bee1c689f06b46659779bddfad07d9c9 (diff)
downloadopenembedded-core-contrib-8a883c3b0773960908491c03c46e7ed320e41dc5.tar.gz
scripts/tiny/ksize: Fix for more recent kernels
In the past kernel built object files were named 'built-in.o'. Nowadays it is 'built-in.a'. The script is modified to work with both. I expect it will not happen that there are built-in.a and built-in.o files in the same kernel. Signed-off-by: Jan Vermaete <jan.vermaete@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/tiny/ksize.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/tiny/ksize.py b/scripts/tiny/ksize.py
index 8316b85cb1..db2b9ec39f 100755
--- a/scripts/tiny/ksize.py
+++ b/scripts/tiny/ksize.py
@@ -4,7 +4,7 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
-# Display details of the kernel build size, broken up by built-in.o. Sort
+# Display details of the kernel build size, broken up by built-in.[o,a]. Sort
# the objects by size. Run from the top level kernel build directory.
#
# Author: Darren Hart <dvhart@linux.intel.com>
@@ -59,7 +59,7 @@ class Report:
p = Popen("ls " + subglob, shell=True, stdout=PIPE, stderr=PIPE, universal_newlines=True)
for f in p.communicate()[0].splitlines():
path = os.path.dirname(f)
- r.parts.append(Report.create(f, path, str(path) + "/*/built-in.o"))
+ r.parts.append(Report.create(f, path, str(path) + "/*/built-in.[o,a]"))
r.parts.sort(reverse=True)
for b in r.parts:
@@ -139,7 +139,7 @@ def main():
else:
assert False, "unhandled option"
- glob = "arch/*/built-in.o */built-in.o"
+ glob = "arch/*/built-in.[o,a] */built-in.[o,a]"
vmlinux = Report.create("vmlinux", "Linux Kernel", glob)
vmlinux.show()