as/ld silently creates programs with undefined references/symbols

Nick Clifton nickc@redhat.com
Fri Aug 13 17:25:00 GMT 2004


Hi Russell,

>>Actually, it's the bfd that needs fixing to split the mapping symbols
>>out from the table of values it presents to the rest of the toolchain. 
>>Then other tools would work correctly as well.  A separate interface can
>>then be used to get the map.

> Has this been implemented yet?  Any ideas when a toolchain with these
> fixes in will be officially released?

This is not an implementation of symbol table separation, but I think 
that it might help you.  The attached patch modifies the 
elf32_arm_find_nearest_line() function which is used by tools like the 
linker to find a function name associated with a particular address when 
it is reporting errors.  The modification is to make the function skip 
any ARM mapping symbols it encounters in its search.

Would you like to try out this patch and let me know what you think ? 
(Note the patch has been made against today's binutils sources in the 
CVS repository.  Thus you may have trouble if you want to apply it to 
say the 2.15 binutils sources.  Especially since I converted elf32-arm.h 
to ISO C90 this morning...)

Cheers
   Nick

bfd/ChangeLog
2004-08-13  Nick Clifton  <nickc@redhat.com>

	* (is_arm_mapping_symbol_name): New function - return true
	when a symbol name matches the requirements for an ARM mapping
	symbol name.
	(arm_elf_find_function): New function based on
	elf_find_function in elf.c but skipping ARM mapping symbols
	and including thumb function symbols.
	(elf32_arm_find_nearest_line): Use arm_elf_find_function.
	(elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: elf32-arm.h.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20040813/8400948d/attachment.ksh>


More information about the Binutils mailing list