kbuild: Bump the build system to 5.1
Our last sync with the kernel was 5.1. Even that was a partial one
as some patches from 4.x kernels were already missing making the
transition to a modern kbuild infeasible.
We are so out of sync now, that tracking the patches and backporting
them one by one makes little sense and it's going to take ages.
This is an attempt to sync up Makefile[.lib/.kbuild].
Unfortunately due to sheer amount of patches this is not easy to review,
but that's what we decided during a community call.
One of the biggest changes is get rid of partial linking entirely and
build .a archives isntead of .o.
We diaviate from the kernel on that. Instead of calling a custom script
to create the archive symbol table, we call ar with rcTP (isntead of
rcSTP) since we want a resulting archive that's sauble with the linker.
The only affected platforms are PPC ones. Unfortunately I don't have any
of them around to test, but the objdump of the resulting files --
arch/powerpc/lib/built-in.[oa] looks identical.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff --git a/doc/api/linker_lists.rst b/doc/api/linker_lists.rst
index 3cd447f..9e6849d 100644
--- a/doc/api/linker_lists.rst
+++ b/doc/api/linker_lists.rst
@@ -130,17 +130,17 @@
In the first case, an 8-byte 'fill' region is added::
__u_boot_list_2_driver_2_testbus_drv
- 0x0000000000270018 0x80 test/built-in.o
+ 0x0000000000270018 0x80 test/built-in.a
0x0000000000270018 _u_boot_list_2_driver_2_testbus_drv
__u_boot_list_2_driver_2_testfdt1_drv
- 0x0000000000270098 0x80 test/built-in.o
+ 0x0000000000270098 0x80 test/built-in.a
0x0000000000270098 _u_boot_list_2_driver_2_testfdt1_drv
*fill* 0x0000000000270118 0x8
__u_boot_list_2_driver_2_testfdt_drv
- 0x0000000000270120 0x80 test/built-in.o
+ 0x0000000000270120 0x80 test/built-in.a
0x0000000000270120 _u_boot_list_2_driver_2_testfdt_drv
__u_boot_list_2_driver_2_testprobe_drv
- 0x00000000002701a0 0x80 test/built-in.o
+ 0x00000000002701a0 0x80 test/built-in.a
0x00000000002701a0 _u_boot_list_2_driver_2_testprobe_drv
With this, the linker_list no-longer works since items after testfdt1_drv
diff --git a/doc/develop/crash_dumps.rst b/doc/develop/crash_dumps.rst
index 4237b07..c84b85b 100644
--- a/doc/develop/crash_dumps.rst
+++ b/doc/develop/crash_dumps.rst
@@ -89,15 +89,15 @@
these lines::
.text.do_undefined
- 0x00000000000101fc 0xc cmd/built-in.o
+ 0x00000000000101fc 0xc cmd/built-in.a
.text.exception_complete
- 0x0000000000010208 0x90 cmd/built-in.o
+ 0x0000000000010208 0x90 cmd/built-in.a
...
.text.cmd_process
- 0x00000000000213b8 0x164 common/built-in.o
+ 0x00000000000213b8 0x164 common/built-in.a
0x00000000000213b8 cmd_process
.text.cmd_process_error
- 0x000000000002151c 0x40 common/built-in.o
+ 0x000000000002151c 0x40 common/built-in.a
0x000000000002151c cmd_process_error
So the error occurred at the start of function do\_undefined() and this