[sparc32] [13/13] ignore undefined symbols with 3 or more leading underscores

William Lee Irwin III
2004-08-05T05:32:00Z

On Wed, Aug 04, 2004 at 10:01:41PM -0700, William Lee Irwin III wrote:
> From: Art Haas <ahaas@airmail.net>
> The 1.3->1.4 changes to the arch/sparc/lib/copy_user.S file added
> parenthesis to a number of macros within that file. The BK changlog
> associated with this change indicate the change was to make the
> file work with gcc-3.3.

***** this touches core files ******

All of the BTFIXUP-related symbols are prefixed with at least three
underscores. In order not to trip this error, sparc32 needs to have
some kind of hook around this phase of linking. So here is one method.

****** this may not be the best patch possible *******

Index: mm2-2.6.8-rc2/Makefile
===================================================================
--- mm2-2.6.8-rc2.orig/Makefile
+++ mm2-2.6.8-rc2/Makefile
@@ -538,7 +538,8 @@
$(if $($(quiet)cmd_vmlinux__), \
echo ' $($(quiet)cmd_vmlinux__)' &&) \
$(cmd_vmlinux__); \
- if $(OBJDUMP) --syms $@ | egrep -q '^([^R]|R[^E]|RE[^G])[^w]*\*UND\*'; then \
+ if $(OBJDUMP) --syms $@ | $(AWK) '$$4!~/^___.*/ { print $$0 }' \
+ | egrep -q '^([^R]|R[^E]|RE[^G])[^w]*\*UND\*'; then \
echo 'ldchk: $@: final image has undefined symbols:'; \
$(NM) $@ | sed 's/^ *U \(.*\)/ \1/p;d'; \
$(RM) -f $@; \