libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug: linking shared libraries on Cygwin results in undefined refere


From: Cygwin/X
Subject: Re: Bug: linking shared libraries on Cygwin results in undefined references to __stack_chck_guard for code compiled with -fstack-protector
Date: Sun, 6 Jun 2010 22:55:51 -0500

Yaakov (Cygwin/X) wrote:
> Bug confirmed.  When code is compiled with -fstack-protector{,-all},
> GCC "emits extra code to check for buffer overflows, such as stack
> smashing attacks".  This extra code uses symbols from libssp, and
> therefore (at least) Cygwin's GCC specs contain:
> 
> *link_ssp:
> %{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}
> 
> Therefore, when libtool fails to pass -fstack-protector{,-all} at link
> stage, the link fails.
> 
> Patch attached.  (Yes, I have a copyright assignment on file.)

One problem:  this doesn't help with CXX, as -nostdlib is used,
circumventing this spec.  Why can't libtool leave these details to the
linker?


Yaakov
Cygwin Ports



reply via email to

[Prev in Thread] Current Thread [Next in Thread]