Skip to contentSkip to conversation

Newer Linux kernels are producing built-in.a files.

PATCH In review jan 3 participants 3 messages May 6, 2020 – May 7, 2020

lore
Share & tools
lore

jan

author
#0 lore raw

PATCH 1/1 Newer Linux kernels are producing built-in.a files.

In the past the file was 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.

---
 scripts/tiny/ksize.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
scripts/tiny/ksize.py +4 -4
index 8316b85cb1..63c5495c91 100755
@@ -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 <[email protected]>
@@ -48,7 +48,7 @@ class Report:
         r = Report(filename, title)
         path = os.path.dirname(filename)
 
-        p = Popen("ls " + str(path) + "/*.o | grep -v built-in.o",
+        p = Popen("ls " + str(path) + "/*.o | grep -v built-in.o | grep -v built-in.a",
                   shell=True, stdout=PIPE, stderr=PIPE, universal_newlines=True)
         glob = ' '.join(p.communicate()[0].splitlines())
         oreport = Report(glob, str(path) + "/*.o")
@@ -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()
Signature · 1 line
2.17.1
#1 lore raw

✗ patchtest: failure for Newer Linux kernels are producing built-in.a files.

== Series Details ==

Series: Newer Linux kernels are producing built-in.a files.
Revision: 1
URL : https://patchwork.openembedded.org/series/23987/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Patch            [scripts] Newer Linux kernels are producing built-in.a files.
 Issue             Shortlog does not follow expected format [test_shortlog_format] 
  Suggested fix    Commit shortlog (first line of commit message) should follow the format "<target>: <summary>"

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
#2 lore raw
In reply to jan
Quoted 26 lines · jan

In the past the file was 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.

---
  scripts/tiny/ksize.py | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
scripts/tiny/ksize.py +1 -1
index 8316b85cb1..63c5495c91 100755
@@ -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 <[email protected]>

scripts/tiny/ksize.py class Report: · line 51

Quoted 5 lines
scripts/tiny/ksize.py +1 -1
@@ -48,7 +48,7 @@ class Report:
          r = Report(filename, title)
          path = os.path.dirname(filename)
 
-        p = Popen("ls " + str(path) + "/*.o | grep -v built-in.o",
+        p = Popen("ls " + str(path) + "/*.o | grep -v built-in.o | grep -v built-in.a",

Looks to me like you don't need to add the last grep; you're only listing *.o to begin with, no ?

Quoted 25 lines
scripts/tiny/ksize.py +2 -2
                    shell=True, stdout=PIPE, stderr=PIPE, universal_newlines=True)
          glob = ' '.join(p.communicate()[0].splitlines())
          oreport = Report(glob, str(path) + "/*.o")
@@ -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()