*BSD News Article 10434


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA106 ; Thu, 28 Jan 93 16:00:22 EST
Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!jato!ufo!kaleb
From: kaleb@jpl-devvax.jpl.nasa.gov (Kaleb Keithley)
Subject: Re: [386BSD] gcc2 and -fPIC
Message-ID: <1993Jan27.172321.14231@jpl-devvax.jpl.nasa.gov>
Organization: Jet Propulsion Laboratory (NASA)
References: <1993Jan26.210430.27806@serval.net.wsu.edu> <1993Jan27.002600.21136@jpl-devvax.jpl.nasa.gov> <1993Jan27.044627.2756@serval.net.wsu.edu>
Date: Wed, 27 Jan 1993 17:23:21 GMT
Lines: 48

In article  hlu@eecs.wsu.edu (H.J. Lu) writes:
>In article  kaleb@jpl-devvax.jpl.nasa.gov (Kaleb Keithley) writes:
>|> In article  hlu@eecs.wsu.edu (H.J. Lu) writes:
>|> >In article  (Chris G. Demetriou) writes:
>|> >|> anybody gotten code compiled w/gcc2's -fPIC to assemble properly
>|> >|> (or "at all") under 386bsd?
>|> >|> 
>|> >That is because as on bsd doesn't support PIC yet. That leads to another
>|> >question. I believe a.out format is not very good for PIC even with some
>|> >patches. Personally, I prefer ELF. The problem is gnu binutils 2.x and
>|> >gas do not fully support ELF. I was wondering if anyone has done something
>|> >on ELF?
>|> 
>|> Huh?  a.out and PIC work pretty good on Sun.  I always understood the
>|> difference between PIC and non-PIC was the use of relative addressing
>|> versus "hard" addressing.  I'm sure the assembler is more than capable
>|> of handling relative offsets if the compiler generates them correctly.
>
>Not even SUN uses that a.out format anymore. ELF is the way to go.

"...that a.out..."  Not everyone has switched to Solaris 2.x!

>|> Gcc doesn't grok PIC on any 386 machine, period, e.g. Sun 386i -- at
>
>You haven't try -fPIC -O on libg++-2.3 yet.
>
>|> least that's what I was told when I asked gnu.gcc.help.  There are patches 
>|> out there to make gcc generate PIC on 386.
>
>Those patches are for psudo PIC for SVR3. I don't care SVR3. I want ELF.

Actually the patches I'm referring to are for SunOS on Sun386i, which
is actually COFF.  At the risk of repeating myself, gcc itself doesn't
yet support PIC on any 386, irrespective of anything else.

>That is precisely why I want PIC. I'like to see PIC/ELF be used in 386bsd
>and Linux.

I think you're asking for an awful lot.  Linus Torvalds, Richard Stallman,
and Bill and Lynne Jolitz already have a lot of momentum behind a.out in
their respective operating systems.  Even if the changes were isolated to 
only the assembler and linker, I haven't seen any evidence that any of them 
intend to deviate from that direction.

-- 

Kaleb Keithley                               kaleb@jpl-devvax.jpl.nasa.gov