as/ld silently creates programs with undefined references/symbols

Nick Clifton nickc@redhat.com
Mon Sep 27 17:28:00 GMT 2004


Hi Russell,

> I've tried merging this patch into binutils 2.15, but
> elf32_arm_output_symbol_hook doesn't appear to be present in this
> version.

True - but this should not affect the rest of the patch.  I will 
generate a version against 2.15 for you next time, after we have 
resolved the issues below.

> The behaviour of binutils 2.15 with this patch, particularly the "nm"
> program appears unaffected.  Is this the expected behaviour?

Yes - I had thought that the problem was with the error messages from 
the linker which were referring to these mapping symbols.  Hence I 
intercepted the problem where the BFD library converts an address into a 
nearest equivalent symbol.  nm does not perform this kind of conversion 
so it will not be affected by the patch.

> If yes, can we please have a patch which prevents these mapping symbols
> escaping into such programs output?
> 
> The Linux kernel is an example of a build system which parses the output
> from "nm" in order to build an internal symbol table.

If the build system parses the output of nm why does it not just locate 
and discard the mapping symbols ?  [I realise that this is the wrong way 
to solve the problem, but surely it would work as a workaround].

Anyway I am looking in to how I can stop nm from displaying the mapping 
symbols.  There will presumably be a command line switch involved 
somewhere so that the symbols can be displayed if the user so wishes, 
but I have yet to decide exactly what form this switch will take.

Cheers
   Nick






More information about the Binutils mailing list