home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / bsd / 11900 < prev    next >
Encoding:
Text File  |  1993-01-28  |  2.7 KB  |  62 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!UB.com!pacbell.com!decwrl!usenet.coe.montana.edu!news.u.washington.edu!serval!hlu
  3. From: hlu@eecs.wsu.edu (H.J. Lu)
  4. Subject: Re: [386BSD] gcc2 and -fPIC
  5. Message-ID: <1993Jan27.044627.2756@serval.net.wsu.edu>
  6. Sender: news@serval.net.wsu.edu (USENET News System)
  7. Organization: School of EECS, Washington State University
  8. References: <CGD.93Jan25211237@eden.CS.Berkeley.EDU> <1993Jan26.210430.27806@serval.net.wsu.edu> <1993Jan27.002600.21136@jpl-devvax.jpl.nasa.gov>
  9. Date: Wed, 27 Jan 93 04:46:27 GMT
  10. Lines: 50
  11.  
  12. In article <1993Jan27.002600.21136@jpl-devvax.jpl.nasa.gov>, kaleb@jpl-devvax.jpl.nasa.gov (Kaleb Keithley) writes:
  13. |> In article <1993Jan26.210430.27806@serval.net.wsu.edu> hlu@eecs.wsu.edu (H.J. Lu) writes:
  14. |> >In article <CGD.93Jan25211237@eden.CS.Berkeley.EDU>, cgd@eden.CS.Berkeley.EDU (Chris G. Demetriou) writes:
  15. |> >|> anybody gotten code compiled w/gcc2's -fPIC to assemble properly
  16. |> >|> (or "at all") under 386bsd?
  17. |> >|> 
  18. |> >That is because as on bsd doesn't support PIC yet. That leads to another
  19. |> >question. I believe a.out format is not very good for PIC even with some
  20. |> >patches. Personally, I prefer ELF. The problem is gnu binutils 2.x and
  21. |> >gas do not fully support ELF. I was wondering if anyone has done something
  22. |> >on ELF?
  23. |> 
  24. |> Huh?  a.out and PIC work pretty good on Sun.  I always understood the
  25. |> difference between PIC and non-PIC was the use of relative addressing
  26. |> versus "hard" addressing.  I'm sure the assembler is more than capable
  27. |> of handling relative offsets if the compiler generates them correctly.
  28. |> 
  29.  
  30. Not even SUN uses that a.out format anymore. ELF is the way to go.
  31.  
  32. |> Gcc doesn't grok PIC on any 386 machine, period, e.g. Sun 386i -- at
  33.  
  34. You haven't try -fPIC -O on libg++-2.3 yet.
  35.  
  36. |> least that's what I was told when I asked gnu.gcc.help.  There are patches 
  37. |> out there to make gcc generate PIC on 386.  One author of such patches told 
  38. |> me that Stallman didn't like them because they broke other things, or didn't 
  39. |> fit the gcc conceptual design or some other blather...
  40. |> 
  41. |> Anyway, ask around on gnu.gcc.help -- the patches are out there!
  42.  
  43. Those patches are for psudo PIC for SVR3. I don't care SVR3. I want ELF.
  44.  
  45. |> 
  46. |> BTW, you probably already know this, but I'll mention it for what it's
  47. |> worth.  99&44/100% of all things compiled with PIC go into shared 
  48. |> "libraries".  Getting things compiled/assembled with PIC is only half the 
  49. |> battle.  Then you have to modify 'ld' to create the library with the PIC 
  50. |> objects.  At least you'll want to handle the pure-text assertion.
  51. |> 
  52. |> -- 
  53. |> 
  54. |> Kaleb Keithley                               kaleb@jpl-devvax.jpl.nasa.gov
  55.  
  56.  
  57. That is precisely why I want PIC. I'like to see PIC/ELF be used in 386bsd
  58. and Linux.
  59.  
  60.  
  61. H.J.
  62.