This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/18925] New: Invalid gprel relocation in PIC
- From: "schwab at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Dec 2004 13:53:53 -0000
- Subject: [Bug target/18925] New: Invalid gprel relocation in PIC
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ cat gprel.cc
class __attribute__ ((visibility("default"))) Type
{
private:
static long _staticTypeCount;
public:
Type() { _staticTypeCount++; }
~Type();
};
long Type::_staticTypeCount = 0;
Type::~Type()
{
_staticTypeCount--;
}
$ gcc -fPIC -fvisibility=hidden -S gprel.cc
$ grep _staticTypeCount gprel.s
.global _ZN4Type16_staticTypeCountE#
.type _ZN4Type16_staticTypeCountE#, @object
.size _ZN4Type16_staticTypeCountE#, 8
_ZN4Type16_staticTypeCountE:
addl r14 = @gprel(_ZN4Type16_staticTypeCountE#), gp
addl r14 = @gprel(_ZN4Type16_staticTypeCountE#), gp
addl r14 = @gprel(_ZN4Type16_staticTypeCountE#), gp
addl r14 = @gprel(_ZN4Type16_staticTypeCountE#), gp
--
Summary: Invalid gprel relocation in PIC
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schwab at suse dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: ia64-*-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18925