From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12088 invoked by alias); 2 Jan 2003 07:18:42 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 12077 invoked from network); 2 Jan 2003 07:18:39 -0000 Received: from unknown (HELO kaikoura.fel.tno.nl) (134.221.46.6) by 209.249.29.67 with SMTP; 2 Jan 2003 07:18:39 -0000 Received: by kaikoura.fel.tno.nl; id IAA01160; Thu, 2 Jan 2003 08:18:24 +0100 (MET) Received: from fs1.fel.tno.nl(134.203.8.201) by kaikoura.fel.tno.nl via smap (V1.0) id xma001095; Thu, 2 Jan 03 08:18:08 +0100 Received: from pc1928.fel.tno.nl ([134.203.9.113]) by fs1.fel.tno.nl (Netscape Messaging Server 4.15) with SMTP id H82SAA00.HRR for ; Thu, 2 Jan 2003 08:18:10 +0100 Received: FROM fel.tno.nl BY pc1928.fel.tno.nl ; Thu Jan 02 08:18:09 2003 +0100 Message-ID: <3E13E7B1.E3CAFEBE@fel.tno.nl> Date: Thu, 02 Jan 2003 07:18:00 -0000 From: "EM Suijker" Organization: TNO-FEL X-Accept-Language: en,nl,de,fr MIME-Version: 1.0 To: gcc-help@gcc.gnu.org CC: "Andrea 'fwyzard' Bocci" Subject: Re: problem with linking References: <5.2.0.9.2.20021230162219.01f3fbc8@popmail.libero.it> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg00008.txt.bz2 Thank you for the replies. The option -Wl,-ztextoff results in a message that not both options -ztext and -ztextoff can be used. So this does not override the option. But I looked in the manual again and found a chapter about spec files. It is possible to write your own spec file. For me it was enough to look into the spec file. You have to use the flag -mimpuretext so -ztext will not be passed to the linker. If you leave out this flag the spec file automatically passes this the option -ztext to the linker. Best regards, Erwin Suijker LLeweLLyn Reese wrote: > > "Andrea 'fwyzard' Bocci" writes: > > > At 16.05 30/12/2002 +0100, EM Suijker wrote: > > >Dear Mr./Madam, > > > > > >Can you help me with the following problem. When I use the command: " > > >g++ -v -shared ....", I see that collect2 also sets the option "-z > > >text". I would like to set this option to "-z textoff" as is the default > > >for dynamic shared libraries with ld. Can you tell me how to do this? I > > >cannot find the solution in the manual pages. Thank you in advance. > > > > IIRC, there is an option to pass to GCC to specify options to be > > passed to the linker. You ca use those, to override "-z text" w/ "-z > > textoff". > > almost. '-Wl,-z textoff' > I believe the quotes are necessary. > > http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Link-Options.html#Link%20Options > > > Have a llok at the GCC manual, I don't remember the option. > > > > BTW, I don't know if what I'm saying is sane to do or not... > > It's quite sane. -- E.M. Suijker (Erwin) TNO Physics and Electronics Laboratory Oude Waalsdorperweg 63 2509 JG The Hague The Netherlands Tel: +31 70 374 04 98 Fax: +31 70 374 06 54 suijker@fel.tno.nl