Subject: non-PIC code on NetBSD/pmax-1.3?
To: None <port-mips@NetBSD.ORG, port-pmax@NetBSD.ORG>
From: Mika Nystrom <mika@cs.caltech.edu>
List: port-mips
Date: 05/07/1998 12:26:27
Hello everyone,
We're trying to compile code on a little Maxine running 1.3 to test
out a hardware project we are working on. There seems to be a
discrepancy between all the manual pages and the compiler tools
(and gcc-2.8.1 from GNU doesn't seem to work right, either---Exec
format error on the produced binaries??) To make a long story
short, we need to generate standard, old-fashioned, non-PIC binaries.
It seems that the latest versions of NetBSD default to generating
everything in PIC form with lots of tables stuffed in for things
like jumps, and we'd simply like to get rid of the extra fluff.
(We're compiling dhrystone to do some performance comparisons
and, ahem, our architecture doesn't handle jump tables well, plus
the fact that dhrystone runs considerably slower with them than
it does when generated by a more straightforward compiler..)
The "obvious" ways of doing it just Don't Seem To Work (fiddling
compiler flags, etc.)
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?
(Please cc: me personally, since I don't subscribe..)
Mika Nystrom <mika@cs.caltech.edu>
Asynchronous Systems Architecture Project
Department of Computer Science
California Institute of Technology