Summary: | hidden visibility of static member in class derived from hash_map changes to default visibility | ||
---|---|---|---|
Product: | gcc | Reporter: | Laszlo Szakony <laszlo.szakony> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | aj, bkoz, braden, caolanm, debian-gcc, gcc-bugs, gcc, geoffk, hhinnant, hjl.tools, ismail, jwillemsen, lanius, laszlo.szakony, lothar, matz, mbeam, mmarcus, mmitchel, mueller, pawel_sikora, pedro.lamarao, pinskia, rhill, simon.strandman |
Priority: | P3 | Keywords: | visibility |
Version: | 4.0.2 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | ||
Attachments: |
Automke sources to reproduce/test the visibility change of static members
Simple test without automake files to test visibility changes of static members |
Description
Laszlo Szakony
2006-03-24 15:00:29 UTC
Created attachment 11113 [details]
Automke sources to reproduce/test the visibility change of static members
Can you give some sources that don't use automake? Because it is hard to follow what is wrong in this bug. Created attachment 11303 [details] Simple test without automake files to test visibility changes of static members To create the binaries and run the test: >tar -xzf simpletest.tar.gz >cd simpletest >./build.sh Actually the shared libs libdlib1.so and libdlib2.so should not export any symbols, but as you can see, both of them have the global symbol SLibC1::m_str. But only in case of hash_map. With std::map works. (In reply to comment #2) > Can you give some sources that don't use automake? Because it is hard to > follow what is wrong in this bug. I have uploaded a simple test without automake files. Actually this bug (if it is a bug) prevents me to use the "windows-like" visibility feature of gcc 4.0. A short explanation: I have ported a project (one dll) from windows, that exports ca. 1200 symbols. After porting to Linux without using the "windows-like" visibility (exporting all symbols on the IF) the number of visible symbols was ca. 75000. I was really happy as I heard of the visibilty feature of gcc 4.0. I implemented that feature as described in http://gcc.gnu.org/wiki/Visibility. The result: The number of exported symols was ca:70000. And the test crashed. After several days I could identify the place of the crash, and I coud create this smaller example. If this "bug" is fixed, is still a question for me: Why is the big difference "1200-Windows" vs. "70000-Linux" in the exported symbols? |