This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]