Article View: gnu.gcc.help
Article #41505gcc's equivalent to SPARCwork's "#pragma init (function)"?
From: Ajit Nilakantan (made donation) ...
Date: Fri, 22 Mar 1996 00:00
Date: Fri, 22 Mar 1996 00:00
16 lines
960 bytes
960 bytes
Hello, I'm trying to use gcc to generate a set of shared libraries for Solaris 2.4. They need to run an initialization function when they are loaded into memory. With the SPARCworks compiler it's easy: just add "#pragma init (init_func)" to the source of the shared library. Looking at the assembly code, this appears to add a call to the function to a .init code section. Is there a way of doing this with gcc (2.7.2)? Thanks for any feedback John W. Rogers ----------------- jwrogers@www.cimmetry.com
Technical Details
Message-ID:
<4iutag$61g@Chart.McRCIM.McGill.EDU>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,8151e8fcb15a61e0,start X-Google-Attributes: gid11318c,public From: ajit@CIM.McGill.CA (Ajit Nilakantan (made donation) hosted by CIM) Subject: gcc's equivalent to SPARCwork's "#pragma init (function)"? Date: 1996/03/22 Message-ID: <4iutag$61g@Chart.McRCIM.McGill.EDU> X-Deja-AN: 143786118 organization: Centre for Intelligent Machines newsgroups: gnu.gcc.help