summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2002-10-05 07:20:36 -0500
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>2002-10-05 07:20:36 -0500
commit345af2c90a1784fb2c9fe3a5cf1bd92955a370ff (patch)
treee23ace634ac499180a008d00672648703a7ae153 /kernel
parent8cc7a29750983ccae7ec85aa11eb7e5c5d69c1a3 (diff)
kbuild: Put .bss back to the end of vmlinux
The kallsyms patches added __kallsyms as last section into vmlinux, behind .bss. This was done to save two additional kallsyms passes, since as the added section was last, it did not change the symbols before it. With the new infrastructure in the top-level Makefile, we do not need to do full relinks for these passes, so they are cheaper. We now use one additional link/kallsyms run to be able to place the __kallsyms section before .bss. The other pass is saved by adding an empty but allocated __kallsyms section in kernel/kallsyms.c, so the first kallsyms pass already generates a section of the final size.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kallsyms.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 3c168c77d3fe..36d2da107b75 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -225,3 +225,9 @@ int kallsyms_sections(void *token,
}
return(1);
}
+
+/* Allocate the __kallsyms section, so it's already present in
+ * the temporary vmlinux that kallsyms is run on, so the first
+ * run will pick up the section info already. */
+
+__asm__(".section __kallsyms,\"a\"\n.previous");