bug-libtool
[Top][All Lists]
Advanced

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

bug#15793: Bug: linking shared libraries on Cygwin results in undefined


From: Richard PALO
Subject: bug#15793: Bug: linking shared libraries on Cygwin results in undefined references to __stack_chck_guard for code compiled with -fstack-protector
Date: Sat, 02 Nov 2013 23:45:29 +0100
User-agent: Mozilla/5.0 (X11; SunOS i86pc; rv:24.0) Gecko/20100101 Thunderbird/24.0.1

Le 02/06/10 05:24, Yaakov (Cygwin/X) a écrit :
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


I've done some limited testing of this patch on a SunOS distro with pkgsrc, and it certainly helps a number of cases since it is gcc that generates the necessary '-lssp_nonshared -lssp' libs for linking (at least in absence of '-nostdlib').

Please include in the upcoming version.







reply via email to

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