public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/38643] New: Doesn't hide (visibility-wise) vtables and VTTs on ARM EABI
@ 2008-12-27 17:15 tbm at cyrius dot com
2008-12-27 17:17 ` [Bug target/38643] " tbm at cyrius dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: tbm at cyrius dot com @ 2008-12-27 17:15 UTC (permalink / raw)
To: gcc-bugs
[ Forwarded from http://bugs.debian.org/490173 ]
Mike Hommey <mh@glandium.org> reported the following bug to Debian:
GCC doesn't hide (visibility-wise) vtables and VTTs on ARM (EABI).
The problem can be seen on the following code:
-----8<---------
class A {
public:
int a;
virtual int v();
};
int A::v() {
return 2;
}
class B : public A {
public:
int b;
};
extern "C" __attribute__((visibility("default"))) int test(void) {
B *b = new B;
return b->v();
}
-------->8-------
Build with: g++ -fvisibility=hidden -o test.o -c test.cpp
Take a look at symbols with objdump -x test.o
Relevant part:
00000000 g O .rodata 0000000c _ZTV1A
00000000 w O .rodata._ZTV1B 0000000c _ZTV1B
These should be marked .hidden.
Resulting shared library (g++ -shared -fvisibility=hidden -o test.so test.cpp)
exports both _ZTV1A and _ZTV1B symbols as a result of this, which is
unexpected.
Proper result is obtained on other architectures (x86 below):
00000000 w O .rodata._ZTV1A 0000000c .hidden _ZTV1A
00000000 w O .rodata._ZTV1B 0000000c .hidden _ZTV1B
Note this may be related to the fact that apparently, ARM doesn't have vtables
in .rodata.
This happens with gcc 4.2, 4.3 and trunk.
--
Summary: Doesn't hide (visibility-wise) vtables and VTTs on ARM
EABI
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tbm at cyrius dot com
GCC target triplet: arm-linux-gnueabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38643
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/38643] Doesn't hide (visibility-wise) vtables and VTTs on ARM EABI
2008-12-27 17:15 [Bug target/38643] New: Doesn't hide (visibility-wise) vtables and VTTs on ARM EABI tbm at cyrius dot com
@ 2008-12-27 17:17 ` tbm at cyrius dot com
2009-01-02 12:15 ` laurent at guerby dot net
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: tbm at cyrius dot com @ 2008-12-27 17:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tbm at cyrius dot com 2008-12-27 17:15 -------
Forgot to say that this only happens with ARM EABI, not with ARM old ABI.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38643
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/38643] Doesn't hide (visibility-wise) vtables and VTTs on ARM EABI
2008-12-27 17:15 [Bug target/38643] New: Doesn't hide (visibility-wise) vtables and VTTs on ARM EABI tbm at cyrius dot com
2008-12-27 17:17 ` [Bug target/38643] " tbm at cyrius dot com
@ 2009-01-02 12:15 ` laurent at guerby dot net
2009-01-03 14:15 ` tbm at cyrius dot com
2009-05-15 6:28 ` ramana at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: laurent at guerby dot net @ 2009-01-02 12:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from laurent at guerby dot net 2009-01-02 12:13 -------
Confirmed on 4.3.2-1 Debian gnueabi
But it looks like it's fixed on trunk rev 142808
00000000 g O .rodata 0000000c .hidden _ZTV1A
00000000 w O .rodata._ZTV1B 0000000c .hidden _ZTV1B
--
laurent at guerby dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Known to fail| |4.3.2
Known to work| |4.4.0
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38643
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/38643] Doesn't hide (visibility-wise) vtables and VTTs on ARM EABI
2008-12-27 17:15 [Bug target/38643] New: Doesn't hide (visibility-wise) vtables and VTTs on ARM EABI tbm at cyrius dot com
2008-12-27 17:17 ` [Bug target/38643] " tbm at cyrius dot com
2009-01-02 12:15 ` laurent at guerby dot net
@ 2009-01-03 14:15 ` tbm at cyrius dot com
2009-05-15 6:28 ` ramana at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: tbm at cyrius dot com @ 2009-01-03 14:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from tbm at cyrius dot com 2009-01-03 14:13 -------
You're right that it works with trunk. I was wrong when I said it still
shows up with trunk. However, it's not fixed with 4.3 from SVN, so this
bug should be left open.
--
tbm at cyrius dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38643
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/38643] Doesn't hide (visibility-wise) vtables and VTTs on ARM EABI
2008-12-27 17:15 [Bug target/38643] New: Doesn't hide (visibility-wise) vtables and VTTs on ARM EABI tbm at cyrius dot com
` (2 preceding siblings ...)
2009-01-03 14:15 ` tbm at cyrius dot com
@ 2009-05-15 6:28 ` ramana at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-05-15 6:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from ramana at gcc dot gnu dot org 2009-05-15 06:28 -------
Doesn't work on 4.3 branch rev. 147478 .Works fine on trunk.
--
ramana at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-05-15 06:28:38
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38643
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-05-15 6:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-27 17:15 [Bug target/38643] New: Doesn't hide (visibility-wise) vtables and VTTs on ARM EABI tbm at cyrius dot com
2008-12-27 17:17 ` [Bug target/38643] " tbm at cyrius dot com
2009-01-02 12:15 ` laurent at guerby dot net
2009-01-03 14:15 ` tbm at cyrius dot com
2009-05-15 6:28 ` ramana at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).