On Wed, Feb 09, 2005 at 10:40:53AM +0000, Russell King wrote:On Tue, Feb 08, 2005 at 08:05:01PM +0000, Russell King wrote:
[...]
LD .tmp_vmlinux1
.tmp_vmlinux1: error: undefined symbol(s) found:
w kallsyms_addresses
w kallsyms_markers
w kallsyms_names
w kallsyms_num_syms
w kallsyms_token_index
w kallsyms_token_table
Maybe kallsyms needs to provide an empty object with these symbols
defined for the first linker pass, instead of using weak symbols?
So, what's the answer? Maybe this patch? With this, we can drop the
__attribute__((weak)) from the kallsyms symbols since they're always
provided.
diff -up -x BitKeeper -x ChangeSet -x SCCS -x _xlk -x *.orig -x *.rej orig/Makefile linux/Makefile
--- orig/Makefile Sun Feb 13 17:26:38 2005
+++ linux/Makefile Sun Feb 13 17:24:17 2005
@@ -702,14 +702,20 @@ quiet_cmd_kallsyms = KSYM $@
cmd_kallsyms = $(NM) -n $< | $(KALLSYMS) \
$(if $(CONFIG_KALLSYMS_ALL),--all-symbols) > $@
-.tmp_kallsyms1.o .tmp_kallsyms2.o .tmp_kallsyms3.o: %.o: %.S scripts FORCE
+.tmp_kallsyms0.o .tmp_kallsyms1.o .tmp_kallsyms2.o .tmp_kallsyms3.o: %.o: %.S scripts FORCE
$(call if_changed_dep,as_o_S)
+.tmp_kallsyms0.S: FORCE
+ @( echo ".data"; \
+ for sym in addresses markers names num_syms token_index token_table; \
+ do echo -e ".globl kallsyms_$$sym\nkallsyms_$$sym:\n"; done; \
+ echo ".word 0"; ) > $@