]> git.neil.brown.name Git - history.git/commit
kbuild: Generalize adding of additional sections to vmlinux
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Sat, 5 Oct 2002 11:57:05 +0000 (06:57 -0500)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Sat, 5 Oct 2002 11:57:05 +0000 (06:57 -0500)
commit8cc7a29750983ccae7ec85aa11eb7e5c5d69c1a3
tree48cebe2d18d44ca0c7b576d4a827b1830c3f6534
parent91990be98c73f0eb63fce5e028d4fb7ea55a457a
kbuild: Generalize adding of additional sections to vmlinux

kallsyms needs to actually have a final vmlinux to extract the symbols,
and then add this information as a new section to the final vmlinux.

Currently, we basically just do the vmlinux link twice, adding
.tmp_kallsyms.o the second time. However, it's actually possible to just
link together the temporary vmlinux generated the first time and the
new object file directly without going back to all the single parts
that the temporary vmlinux was linked from.

This mechanism should be useful for sparc as well, where the btfix
mechanism needs an already linked vmlinux, too.

IMPORTANT: This does only work as desired if the link script can be
used recursively, i.e.

ld <flags> -T arch/$(ARCH)/vmlinux.lds.s -o vmlinux.test vmlinux

generates a vmlinux.test which is identical to vmlinux.
arch/i386/vmlinux.lds.S needed a little tweaking, so probably the
other archs do as well.
Makefile
arch/i386/vmlinux.lds.S