http://llvm.org/bugs/show_bug.cgi?id=12221

             Bug #: 12221
           Summary: clang generates DEFAULT symbols that should be HIDDEN
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


clang++ generates a DEFAULT-visibility symbol where g++ generates a HIDDEN one.
g++ is 4.4.3-4ubuntu5 and clang is 151385, both on an ubuntu (lucid) box.

$ echo -e "#include <vector>\nstd::vector<int> myvec;" > src.cc && for c in "  
 g++" clang++; do echo -en "$c:";  $c -fPIC -fvisibility=hidden -fvishidden -c
src.cc && readelf -Ws src.o|c++filt|grep myvec; done
    g++:    46: 0000000000000000    24 OBJECT  GLOBAL HIDDEN   21 myvec
clang++:    77: 0000000000000000    24 OBJECT  GLOBAL DEFAULT   24 myvec

clang should be generating a HIDDEN symbol, not a DEFAULT one.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to