Re: ARM undefined symbols. Again.

Sam Ravnborg
2005-01-31T16:16:13Z

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 \