This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch bfd]: Don't emit auxilary information for discared sections for pe-coff
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Tue, 27 Sep 2011 14:38:19 +0200
- Subject: [patch bfd]: Don't emit auxilary information for discared sections for pe-coff
Hello,
this patch takes care that we don't emit auxilary information for symbols
from excluded sections.
2011-09-27 Kai Tietz <ktietz@redhat.com>
* coffgen.c (coff_write_symbol): Don't write
auxilary symbols from excluded sections.
(coff_write_alien_symbol): Likewise.
Regression tested for x86_64-w64-mingw32, i686-w64-mingw32, and i686-pc-cygwin.
Ok for apply?
Regards,
Kai
Index: bfd/coffgen.c
===================================================================
RCS file: /cvs/src/src/bfd/coffgen.c,v
retrieving revision 1.80
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;
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;
native = &dummy;
native->u.syment.n_type = T_NULL;
native->u.syment.n_flags = 0;