delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/08/21/20:20:52

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:mime-version:date:message-id:subject:to
:content-type; q=dns; s=default; b=YCAWiizU4sGA0Q+xwVjmc2Ix4MTJu
DYkVhtCOvISQHXRYK9BMRjZQ+4AppmxyAe7xL11T/GPzICjXv/HkWXxtgkovP1bR
2/4PtbOoXiyAUYSaiUk2VAgeeeFsSciqiNGFIfMDX083gAwqBQrxIAXtZmB53Zjg
vQWrtvuNv+0onc=
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:mime-version:date:message-id:subject:to
:content-type; s=default; bh=7ZD0wgKm9GC1ZuHefKqpzHwTZ3w=; b=O6f
zKHX6yGGmCoTk96A/mfH2YYfNKDvnZJfMzRVd8h+JhGxjQahU/J7BquX5W0BW6Z4
aE0wPIshXdYczKevoYz1alwMSOH0O4P4yzwvzvQ51AWyyqUZGmaiMcDbF4L8eXQb
T7e6qJg5eE+0QfB0J8cWzbhpsVNl1y5F4j+EZ21g=
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=-0.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-vc0-f174.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:thread-index:date:message-id :subject:to:content-type; bh=yxowLJX0ODgGtZ1AOGsBXst5YsyBt9n6JxRZF0ok2+k=; b=WIZqSddE0GRRqPEuGyytQYCuBM9+PMR4KmkvVcb+B4CJxVMqczAsUHb1cZ8hKiTA+s D8nQ/C/X9GXW6GEi7jenClTxusNQVAvXtIgrOA62vO2AbZ0nnyuD8B+eNEw6pSXC7G/a vXXB3zKou82goc8B21st/aFKr2tYTkugOdCS2O+Izxs4xjAqcNjcr465mR7xzL9tWSEx taC/+Hv5VmAT+fHNMTrPqCtuOXC5rHXtE63yX/BtiLiaLBgHX7o8nm3FiZuPJAr0J32Y tpRasJus4nnDpPsvI4CD2RKl04zK2l8FGVNLq+7+jYuQjMh12JJiGkBKq1XGYD8gTbG+ IleA==
X-Gm-Message-State: ALoCoQn5xPe80C9I9jyFN4pL7y+icrLRhy4VU4Kwps7YWWEAUq4KwTBMA5o1+KTy24LLE3XZ1Vmm
X-Received: by 10.220.112.143 with SMTP id w15mr1362700vcp.41.1408666829988; Thu, 21 Aug 2014 17:20:29 -0700 (PDT)
From: "Christoph H. Hochstaetter" <christoph AT hochstaetter DOT de>
MIME-Version: 1.0
Date: Fri, 22 Aug 2014 02:20:29 +0200
Message-ID: <c2ded31183a3b8c46efb39206c7ec90d@mail.gmail.com>
Subject: ld segfaults with -flto after upgrading to gcc 4.8.3-3 (64-bit)
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Hi,

I just upgraded gcc from 4.8.3-2 to 4.8.3-3. ld segfaults if gcc (and thus
ld) is used with link time optimization (-flto).

[ch AT laptop2 ~] $ gcc -o hello.exe hello.c
[ch AT laptop2 ~] $ ./hello.exe
Hello world!
[ch AT laptop2 ~] $ rm -f hello.exe
[ch AT laptop2 ~] $ gcc -o hello.exe hello.c -flto
collect2: error: ld terminated with signal 11 [Segmentation fault]
[ch AT laptop2 ~] $ ./hello.exe
Hello world!
[ch AT laptop2 ~] $

Besides from segfaulting ld creates a working hello.exe. I've also
compiled some more complex projects with several *.o files. EXEs all work
great. Tested on two different machines (both Windows 8.1 Update 1
64-bit). Binutils is 2.24.51-5 [GNU ld (GNU Binutils) 2.24.51.20140703]
before and after gcc upgrade. Reverting to gcc 4.8.3-2 solves the problem.

Same behavior if g++ is used to compile (works with 4.8.3-2, ld segfaults
with 4.8.3-3)

To be complete, here is my hello.c (segfault occurs with any file you
compile and link with -flto):

#include <stdio.h>

int main(int argc, char** argv)
{
        printf("Hello world!\n");
        return 0;
}

Regards

-Christoph

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