Article View: gnu.misc.discuss
Article #1811Re: Cygnus gcc and loadable modules Solaris 2.1
From: Joe Buck
Date: Tue, 26 Jan 1993 19:15
Date: Tue, 26 Jan 1993 19:15
30 lines
1736 bytes
1736 bytes
In article <1843@pacvax.UUCP> fields@pacvax.UUCP (Daniel A. Fields) writes:
>When I compile a pushable module with the SPARCcompiler I am able to
>load the module with no problem. Compile the thing with the Cygnus gcc
>The kernel panics when it is trying to relocate the object. Objects
>produced from both compiler are "ELF 32-bit MSB relocatable SPARC
>Version 1". What the deal ?
Kind of an odd group to post this question to, but I'll take a shot
at an answer anyway (gnu.gcc.help would have been better).
It's possible that the problem has to do with a disagreement between
your code and the kernel as to how structs are passed; by default,
gcc uses an incompatible method. If this is the problem, you could
try using -fpcc-struct-return. From the GCC manual:
`-fpcc-struct-return'
Use the same convention for returning `struct' and `union' values
that is used by the usual C compiler on your system. This
convention is less efficient for small structures, and on many
machines it fails to be reentrant; but it has the advantage of
allowing intercallability between GNU CC-compiled code and
PCC-compiled code
(Sun's compiler is not pcc-based, but the flag still has this name).
--
Joe Buck jbuck@ohm.berkeley.edu
Technical Details
Message-ID:
<1k42kv$nug@agate.berkeley.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!forney.berkeley.edu!jbuckReferences:
<1843@pacvax.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!forney.berkeley.edu!jbuck From: jbuck@forney.berkeley.edu (Joe Buck) Newsgroups: gnu.misc.discuss Subject: Re: Cygnus gcc and loadable modules Solaris 2.1 Date: 26 Jan 1993 19:15:43 GMT Organization: U. C. Berkeley Lines: 30 Message-ID: <1k42kv$nug@agate.berkeley.edu> References: <1843@pacvax.UUCP> NNTP-Posting-Host: forney.berkeley.edu Keywords: Cygnus gcc and loadable modules Solaris 2.1