Subject: non-PIC code on NetBSD/pmax-1.3?
To: Mika Nystrom <mika@cs.caltech.edu>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-mips
Date: 05/07/1998 12:48:42
[ trying to build binaries without MIPS abicall indirection]

>Trying (for instance) -G8 tells you that PIC is the default, and it
>still produces the PIC stuff.  Adding -mno-abicalls works fine, for
>the compilation phase, but the linker warns about linking PIC and
>non-PIC code, and hello, world! segfaults as a result... (statically
>linked)

>Anyone want to explain what's going on or offer suggestions?  
>Do I have to build some non-PIC'd libraries?

Yes, you do.  

The standard ``non-PIC'' libraries acutally have, and require, all the
PIC indirection goo.  Otherwise, users would have to use different
compilation flags for their own .o flags, depending on whether they
wanted static or dynamically linked binaries.

I polled the users and other NetBSD developers, and checked out what
other MIPS-cpu systems with shared libs did, and there was a very
strong consensus that the current behaviour was the right tradeoff.

It does mean you need to rebuild all your own libraires if you want to
shave off all the ELF PIC overhead, though.