Re: binutils woes

From: Russell King
Date: Thu Jul 01 2004 - 17:25:21 EST


On Thu, Jul 01, 2004 at 03:21:34PM -0700, Andrew Morton wrote:
> Russell King <rmk+lkml@xxxxxxxxxxxxxxxx> wrote:
> >
> > Essentially, we run 'nm' against the object, and look for any line
> > which matches the pattern '^ *U '. With this, a failing output looks
> > like:
> >
> > LD init/built-in.o
> > LD .tmp_vmlinux1
> > ldchk: .tmp_vmlinux1: final image has undefined symbols:
> > SIZEOF_MACHINE_DESC
>
> What is the user supposed to do when this happens?

Report it as an error to the most appropriate forum. Then it becomes
a hunt for why the symbol is undefined.

Sorry, afaics it's not possible to do this any better.

To illustrate the severity of the problem better, the following
program:

.globl _start
_start:
add r0, r0, #UNDEFINED_SYMBOL
mov pc, lr

will successfully assemble and link on ARM, and is in fact runnable
despite having a symbol table of the following:

$ arm-linux-nm t
00008074 t $a
0001007c A __bss_end__
0001007c A _bss_end__
0001007c A __bss_start
0001007c A __bss_start__
0001007c D __data_start
0001007c A _edata
0001007c A _end
0001007c A __end__
00008074 T _start
U UNDEFINED_SYMBOL


--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
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/