This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/467] New: Build fails on sparc when gcc supports comdat


Repasting my mail from libc-alpha: 
 
This is what glibc does on sparc: 
 
#   define __make_section_unallocated(section_string)   \ 
        asm (".section " section_string "\n\t.previous"); 
 
__make_section_unallocated 
  (".gnu.linkonce.b.__sparc32_atomic_locks, \"aw\", %nobits"); 
 
volatile unsigned char __sparc32_atomic_locks[64] 
  __attribute__ ((nocommon, 
        section (".gnu.linkonce.b.__sparc32_atomic_locks" "\n\t#"), 
                  visibility ("hidden"))); 
 
On gcc without comdat this results with two .section entries: 
 
    .section .gnu.linkonce.b.__sparc32_atomic_locks, "aw", %nobits 
 
    .section    .gnu.linkonce.b.__sparc32_atomic_locks 
    #,"aw",@nobits 
 
As one can see, that's a smart move to define '%nobits' instead of  
'@nobits' (whatever that does :). 
 
On gccs with comdat support the same code results in: 
 
        .section .gnu.linkonce.b.__sparc32_atomic_locks, "aw", %nobits 
 
        .section        .bss,"awG",@nobits,.__sparc32_atomic_locks 
        #,comdat 
 
This results in (a) additional definition  
of .gnu.linkonce.b.__sparc32_atomic_locks section (which is empty and kind of  
useless) and (b) commenting out comdat definition which causes conflicts when  
linking (since that definition is supposed to replace .gnu.linkonce). 
 
A fix to just make it compile is simple - removal of "\n\t#". But what about  
that nobits hack? It's there for a reason (right? :) and it can't be  
'rehacked' in the same way since .section syntax changed.

-- 
           Summary: Build fails on sparc when gcc supports comdat
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: mmazur at kernel dot pl
                CC: glibc-bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=467

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]