delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/01/21/03:31:15

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:message-id:date:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=QaG
7bftc5Lut980QnBBPIsdAXAg8gMLeDtjSgFUPfdwSoGIRW7MIVVKgx5/vFvJgwOp
xqEJWw7tZB/ENWcEwv7dMQplA0puxkKuCuoKRtNh5mYgbpuGgLaIE8ZW1IpKVQRZ
ivuPlmWuqjs3JGdzds0OzgX2dlKa+Tfi8YTJtXWw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:message-id:date:mime-version
:content-type:content-transfer-encoding; s=default; bh=WkW6kLRjG
PokO8z/i9yAq7ptVOs=; b=VaiO7MeUFHK9I9HTtNz3/bNMWWb9frHESzKT5n3aE
n2UHAJdbHHU2l7Sa0UkY4KestVFrq7l4wL+rknTneX3CZKuGyPw94+DOqwC9GyaM
7t0YaXl5LYfTmqMPB2hEGn65zUSZz6ms+pGTe2aaQf5+bzk6r2Nw2uQMYWWtNruO
mE=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:!192.168.1.101!, H*RU:!192.168.1.101!, H*r:ip*192.168.1.101, sk:rdata$.
X-HELO: mail-pf0-f174.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=1XhNJHjfmeekaHItnuhV2lX2mWYlgGaFyQ8Q+ept6EQ=; b=MC9oi4U2GGTr8TDaiKgQy2ZZgC6uE5B7ul14BBwXUgdq4cd+vV9GvednFHuSyN9Rlt bzM5A1vHUcRS+99WsRuXGwPd5BCUkL5AqsCkHYwRb6HQitH2xY+qtlUOCQHBzTOLmzO+ orz/5DxfvldeerE5rMOL1W1a1iBgpkElQ5eC7RT2VWkwnc49gkJu+OaGu1fBOaLvtqlf +gY/ZYJgiM51OqW9+F8D2yzdNdSnzlD19V2R/p1YlQqeTbFGFdBj5A8ZTQ20Q8OGG5/g Nb4xGdLDAmv1NOpOqnRf1I3U+58Ed8mS7EMlG6UeMKAlkr6e6XIYLoRLuEheiLF9IYkP PNeQ==
X-Gm-Message-State: AKwxytdQEMRv5fko+dvMdug2zQL/Ri4SwMZMQskTN6KfzDP1M+HixG/W 3Mj7XqPWSl+gGP7TxSjxXQzHWSMn
X-Google-Smtp-Source: AH8x225HvIt1ZziXzUeKEzNFmvza/NsUUC/Q7ZgR7yqYM/fiGTuoRZsO15+H7AY07HUcd+/0nu/7Jw==
X-Received: by 10.99.3.71 with SMTP id 68mr4086930pgd.334.1516523417467; Sun, 21 Jan 2018 00:30:17 -0800 (PST)
From: DDoSolitary <ddosolitary AT gmail DOT com>
X-Google-Original-From: DDoSolitary <DDoSolitary AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: -fstack-protector and -fstack-protector-all broken after updating to gcc-core-6.4.0-5
Message-ID: <2475a459-9ebb-488b-202f-8fb068adec25@gmail.com>
Date: Sun, 21 Jan 2018 16:30:07 +0800
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2
MIME-Version: 1.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

The stack protector options are broken after updating gcc-core to 6.4.0-
5.

For example compiling the following C code with "gcc foo.cpp
- -fstack-protector-all" results in errors.

int main() {
	return 0;
}

/tmp/ccrXUPvn.o:foo.c:(.text+0x33): undefined reference to
`__stack_chk_fail'
/tmp/ccrXUPvn.o:foo.c:(.text+0x33): relocation truncated to fit:
R_X86_64_PC32 against undefined symbol `__stack_chk_fail'
/tmp/ccrXUPvn.o:foo.c:(.rdata$.refptr.__stack_chk_guard[.refptr.__stack_
chk_guard]+0x0):
undefined reference to `__stack_chk_guard'
collect2: error: ld returned 1 exit status

Downgrading gcc-core to 6.4.0-4 fixes the problem.

After checking the content of the package, I found out that
libssp-related files (libssp.a, libssp.h, etc) are missing. So I
copied libssp.a from the 6.4.0-4 package to
/usr/lib/gcc/x86_64-pc-cygwin/6.4.0 and tried to re-compile the code
above with "gcc foo.cpp -fstack-protector-all -lssp" and it worked well.
-----BEGIN PGP SIGNATURE-----

iIwEARYIADQWIQRojh0JPDY49YiJDURQJoMRx60/YgUCWmRPfRYcZGRvc29saXRh
cnlAZ21haWwuY29tAAoJEFAmgxHHrT9iSZMBAPQrHGnkmfBMMtxYq+FCeRZFmCB+
gRgtPp6g/V8TJ69fAP9gdARFxjaTb5j5qFN3LBHbjsNa2APSaqswwEpwFO07CQ==
=U2fd
-----END PGP SIGNATURE-----

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019