This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch bfd]: Don't emit auxilary information for discared sections for pe-coff
2011/9/29 Alan Modra <amodra@gmail.com>:
> On Tue, Sep 27, 2011 at 02:38:19PM +0200, Kai Tietz wrote:
>> diff -u -r1.80 coffgen.c
>> --- bfd/coffgen.c ? ? 17 Aug 2011 00:39:39 -0000 ? ? ?1.80
>> +++ bfd/coffgen.c ? ? 27 Sep 2011 11:21:47 -0000
>> @@ -921,6 +921,9 @@
>> ? ?void * buf;
>> ? ?bfd_size_type symesz;
>>
>> + ?if ((bfd_get_section_flags (abfd, symbol->section) & SEC_LINK_ONCE) != 0
>> + ? ? ?&& symbol->section->output_section == bfd_abs_section_ptr)
>> + ? ?return TRUE;
>
> Conditional on link_info.strip_discarded?
Hmm, ok. As I see is for strip_discarded the default value true in
ldmain.c file.
>> ? ?if (native->u.syment.n_sclass == C_FILE)
>> ? ? ?symbol->flags |= BSF_DEBUGGING;
>>
>> @@ -996,7 +999,10 @@
>> ? ?asection *output_section = symbol->section->output_section
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? symbol->section->output_section
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?: symbol->section;
>> -
>> + ?if ((bfd_get_section_flags (abfd, symbol->section) & SEC_LINK_ONCE) != 0
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? && symbol->section->output_section
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?== bfd_abs_section_ptr)
>> + ? ?return TRUE;
>
> This hunk seems unnecessary, given that coff_write_alien_symbol calls
> coff_write_symbol.
Well, the difference here is that for debugging-symbols don't discard
the name and are entering into string-table. Maybe we should set here
in this condition symbol->name = "";?
Kai