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: Tue, 1 Jun 2010 22:24:15 -0500

On Sat, 15 May 2010 09:07:49 +0200
Bart Van Assche <address@hidden> wrote:
> This behavior has been observed with libtool version 2.2.6.

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.)


Yaakov
Cygwin/X

Attachment: 0001-Fix-linking-with-fstack-protector.patch
Description: Text Data


reply via email to

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