This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: HP-UX IA64 patch from October (section usage)
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: rth at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org, jakub at redhat dot com
- Date: Tue, 28 Jan 2003 10:33:31 -0800 (PST)
- Subject: Re: HP-UX IA64 patch from October (section usage)
Richard,
I tried out your patch but it didn't fix my problem. While the patch
forces flag_pic to be true it doesn't affect read-only vs. read-write
and that seems to be my problem. I appear to be selecting
SECCAT_DATA_REL_RO and I need SECCAT_DATA_REL. Is there a way for me to
force the vtable to not be read-only? Here is a small program and the
error I get from the HP linker (using a compiler that includes your
patch):
[hpadl731] $ cat x.C
class A1 {
public:
virtual void foo() {};
};
class A2 : public virtual A1 {};
int main()
{
A1* a=new A2;
return 0;
}
[hpadl731] $ g++ x.C -o x
ld: Invalid dynamic relocation needed for read-only section, in finput file /var
/tmp//ccxN3fzi.o, for symbol vtable for __cxxabiv1::__vmi_class_type_infoat offs
et 0
ld: Invalid dynamic relocation needed for read-only section, in finput file /var
/tmp//ccxN3fzi.o, for symbol vtable for __cxxabiv1::__class_type_infoat offset 0
2 errors.
collect2: ld returned 1 exit status
Steve Ellcey
sje@cup.hp.com