Re: ARM undefined symbols. Again.

From: Sam Ravnborg
Date: Mon Jan 31 2005 - 11:18:15 EST


On Mon, Jan 24, 2005 at 03:43:26PM +0000, Russell King wrote:
> Sam,
>
> Where did the hacks go which detect the silent failure of the ARM binutils?

They weant away because it caused lots of troubles with sparc and um.
Can you use this (untested patch) for arm?

Sam

===== Makefile 1.85 vs edited =====
--- 1.85/arch/arm/Makefile 2004-10-24 00:50:16 +02:00
+++ edited/Makefile 2005-01-31 17:15:55 +01:00
@@ -181,10 +181,19 @@
# Convert bzImage to zImage
bzImage: zImage

-zImage Image xipImage bootpImage uImage: vmlinux
+# Check for undefined symbols. Broken arm binutils may leave symbols undefined
+.PHONY: check-vmlinux
+vmlinux: check-vmlinux
+ if [ "`$(NM) -u vmlinux`" != "" ]; then \
+ echo "vmlinux: error: undefined symbol(s) found:"; \
+ $(NM) -u vmlinux; \
+ exit 1; \
+ fi
+
+zImage Image xipImage bootpImage uImage: check-vmlinux
$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@

-zinstall install: vmlinux
+zinstall install: check-vmlinux
$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@

CLEAN_FILES += include/asm-arm/constants.h* include/asm-arm/mach-types.h \
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/