[PATCH] COFF/PE: insert local symbols from foreign input objects into output executable

Nick Clifton nickc@redhat.com
Tue Oct 25 09:02:00 GMT 2011
Hi Jan,

> bfd/
> 2011-09-28  Jan Beulich<jbeulich@suse.com>
>
> 	* coffgen.c (coff_write_alien_symbol): Make public. Add 'struct
> 	internal_syment *' parameter. Extend 'dummy' to an array with two
> 	elements. Set n_numaux early. Handle BSF_FILE.
> 	(coff_write_symbols): Pass NULL as new third argument to
> 	coff_write_alien_symbol().
> 	* cofflink.c (_bfd_coff_final_link): Don't use COFF-specific
> 	obj_raw_syment_count() on non-COFF input BFD. Insert local symbols
> 	from non-COFF input BFDs.
> 	* libcoff-in.h (coff_write_alien_symbol): Declare.
> 	* libcoff.h (coff_write_alien_symbol): Re-generate.

Approved - please apply.

> +  if (finfo.info->strip != strip_all&&  finfo.info->discard != discard_all)
> +    {
> +      /* Add local symbols from foreign inputs.  */
> +      for(sub = info->input_bfds; sub != NULL; sub = sub->link_next)

I think that it would be worthwhile extending this comment to explain 
why the local symbols are being preserved.

Cheers
   Nick



More information about the Binutils mailing list