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

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!stanford.edu!ames!elroy.jpl.nasa.gov!ufo!kaleb
  3. From: kaleb@jpl-devvax.jpl.nasa.gov (Kaleb Keithley)
  4. Subject: Re: [386BSD] gcc2 and -fPIC
  5. Message-ID: <1993Jan27.002600.21136@jpl-devvax.jpl.nasa.gov>
  6. Organization: Jet Propulsion Laboratory (NASA)
  7. References: <CGD.93Jan25211237@eden.CS.Berkeley.EDU> <1993Jan26.210430.27806@serval.net.wsu.edu>
  8. Date: Wed, 27 Jan 1993 00:26:00 GMT
  9. Lines: 34
  10.  
  11. In article <1993Jan26.210430.27806@serval.net.wsu.edu> hlu@eecs.wsu.edu (H.J. Lu) writes:
  12. >In article <CGD.93Jan25211237@eden.CS.Berkeley.EDU>, cgd@eden.CS.Berkeley.EDU (Chris G. Demetriou) writes:
  13. >|> anybody gotten code compiled w/gcc2's -fPIC to assemble properly
  14. >|> (or "at all") under 386bsd?
  15. >|> 
  16. >That is because as on bsd doesn't support PIC yet. That leads to another
  17. >question. I believe a.out format is not very good for PIC even with some
  18. >patches. Personally, I prefer ELF. The problem is gnu binutils 2.x and
  19. >gas do not fully support ELF. I was wondering if anyone has done something
  20. >on ELF?
  21.  
  22. Huh?  a.out and PIC work pretty good on Sun.  I always understood the
  23. difference between PIC and non-PIC was the use of relative addressing
  24. versus "hard" addressing.  I'm sure the assembler is more than capable
  25. of handling relative offsets if the compiler generates them correctly.
  26.  
  27. Gcc doesn't grok PIC on any 386 machine, period, e.g. Sun 386i -- at 
  28. least that's what I was told when I asked gnu.gcc.help.  There are patches 
  29. out there to make gcc generate PIC on 386.  One author of such patches told 
  30. me that Stallman didn't like them because they broke other things, or didn't 
  31. fit the gcc conceptual design or some other blather...
  32.  
  33. Anyway, ask around on gnu.gcc.help -- the patches are out there!
  34.  
  35. BTW, you probably already know this, but I'll mention it for what it's
  36. worth.  99&44/100% of all things compiled with PIC go into shared 
  37. "libraries".  Getting things compiled/assembled with PIC is only half the 
  38. battle.  Then you have to modify 'ld' to create the library with the PIC 
  39. objects.  At least you'll want to handle the pure-text assertion.
  40.  
  41. -- 
  42.  
  43. Kaleb Keithley                               kaleb@jpl-devvax.jpl.nasa.gov
  44.  
  45.