http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47218

Dave Korn <davek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.01.07 21:05:02
     Ever Confirmed|0                           |1

--- Comment #1 from Dave Korn <davek at gcc dot gnu.org> 2011-01-07 21:05:02 
UTC ---
Yeah, confirmed that.  With the older compiler the NVT is emitted in a comdat
section as you'd expect: the symbols ...

[6421](sec 2101)(fl 0x00)(ty  20)(scl   2) (nx 0) 0x00000000
__ZThn32_N13wxFFileStreamD1Ev
[6427](sec 2103)(fl 0x00)(ty  20)(scl   2) (nx 0) 0x00000000
__ZThn32_N13wxFFileStreamD0Ev

... point to sections (note MS numbers sections from 1, objdump from zero) like
so:

2100 .text$_ZThn32_N13wxFFileStreamD1Ev 0000000c  00000000  00000000  0002d368 
2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE,
LINK_ONCE_DISCARD (COMDAT __ZThn32_N13wxFFileStreamD1Ev 6421)

2102 .text$_ZThn32_N13wxFFileStreamD0Ev 0000000c  00000000  00000000  0002d3e0 
2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE,
LINK_ONCE_DISCARD (COMDAT __ZThn32_N13wxFFileStreamD0Ev 6427)

With the latest trunk however, the same symbols ... 

[6419](sec  1)(fl 0x00)(ty  20)(scl   2) (nx 0) 0x00000fa8
__ZThn32_N13wxFFileStreamD1Ev
[6423](sec  1)(fl 0x00)(ty  20)(scl   2) (nx 0) 0x00000fb2
__ZThn32_N13wxFFileStreamD0Ev

... both point to section 1: the .text section.

  0 .text         00000fd0  00000000  00000000  0001633c  2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE


This being replicated across all object files, no wonder we have multiple
defintion errors.  It's a bug that the NVT doesn't get emitted in a comdat, I
expect.

(I think I remember some kind of recent change to section handling that I saw
fly past on the patches list, wonder if it could be related.)

Reply via email to