This is the mail archive of the gcc-bugs@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]

Re: building shared libs with g++ 2.95.2 on HP-UX 11


Alexandre Oliva wrote:
> 
> On Sep  9, 2000, Martin Sebor <sebor@roguewave.com> wrote:
> 
> > $ echo "void foo () { }" > t.cpp ; gcc -c -fPIC t.cpp && gcc t.o -shared
> > -o libt.sl
> > /usr/bin/ld: DP relative code in file /var/tmp/ccyhoDuR.o - shared
> > library must be position
> >     independent.  Use +z or +Z to recompile.
> 
> Use -fPIC when linking too, so that the C file implicitly compiled by
> collect is compiled with -fPIC too.
> 

Thanks, I should have thought of that. I'm still getting errors but
that's where the "unsupported business" comes in, I suppose.

Martin

...
/usr/bin/ld: Target of unconditional branch is out of range
   Reference from:  instance.o(0x44028)
/usr/bin/ld: Target of unconditional branch is out of range
   Reference from:  instance.o(0x4a638)
/usr/bin/ld: Invalid fixups exist
collect2: ld returned 1 exit status


> --
> Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
> Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
> CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
> Free Software Evangelist    *Please* write to mailing lists, not to me

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