Article View: gnu.gcc.help
Article #53035gcc 2.0 -fpic on Sun386i -- anyone?
From: Luc Rooijakkers
Date: Fri, 20 Mar 1992 08:33
Date: Fri, 20 Mar 1992 08:33
26 lines
2156 bytes
2156 bytes
I have been trying to generate position independent code with gcc 2.0 on the Sun 386i machine (using -fpic). Gcc generates strange @GOTOFF(%ebx), @PLT, @GOT and @GOTOFF suffixes to machine adresses which the sun assembler doesn't grok, and from a quick look in the gas 1.38 sources it seems that gas doesn't either. Gcc also doesn't generate the required function prologue for pic code. Using cc -pic seems to generate more "normal" code, except that instead of "call func@PLT" (gcc -fpic) it generates "call func,%eax" which doesn't seem to exist according to the sun assembler manuals (especially since %ebx is used for the offset table). I suppose this is a sun hack to get the assembler to generate special reloc info for the call. Now, I think it would be relatively little work to get this working with gcc, but before I start on that I would like to find out if someone has already done this. Helpful hints are also welcome. Since the @ things obviously work on *some* 386 platform (SVR4?), can someone enlighten me about what they are supposed to mean? Please mail; I will summarize to the net if there is enough interest. -- Luc Rooijakkers Internet: lwj@cs.kun.nl Faculty of Mathematics and Computer Science UUCP: uunet!cs.kun.nl!lwj University of Nijmegen, the Netherlands tel. +3180652271
Technical Details
Message-ID:
<1992Mar20.083354.6112@sci.kun.nl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!wn1.sci.kun.nl!cs.kun.nl!lwjShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,249f3a59fcda91d5,start X-Google-Attributes: gid11318c,public X-Google-Thread: 102b08,249f3a59fcda91d5,start X-Google-Attributes: gid102b08,public X-Google-Thread: 1048e3,249f3a59fcda91d5,start X-Google-Attributes: gid1048e3,public X-Google-ArrivalTime: 1992-03-19 10:18:55 PST Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!wn1.sci.kun.nl!cs.kun.nl!lwj From: lwj@cs.kun.nl (Luc Rooijakkers) Newsgroups: gnu.gcc.help,comp.sys.sun.apps,comp.unix.sysv386 Subject: gcc 2.0 -fpic on Sun386i -- anyone? Keywords: gcc gcc2 pic sun386i Message-ID: <1992Mar20.083354.6112@sci.kun.nl> Date: 20 Mar 92 08:33:54 GMT Sender: news@sci.kun.nl (NUnet News Owner) Organization: University of Nijmegen, The Netherlands Lines: 26