This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem with linking


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" <fwyzard@inwind.it> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]