From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8858 invoked by alias); 14 Aug 2012 07:52:41 -0000 Received: (qmail 8848 invoked by uid 22791); 14 Aug 2012 07:52:39 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_NX X-Spam-Check-By: sourceware.org Received: from mail-gg0-f169.google.com (HELO mail-gg0-f169.google.com) (209.85.161.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Aug 2012 07:52:26 +0000 Received: by ggnf4 with SMTP id f4so120895ggn.0 for ; Tue, 14 Aug 2012 00:52:25 -0700 (PDT) Received: by 10.68.136.137 with SMTP id qa9mr19259307pbb.140.1344930745422; Tue, 14 Aug 2012 00:52:25 -0700 (PDT) Received: from [192.168.11.128] ([112.233.72.114]) by mx.google.com with ESMTPS id nm10sm569528pbc.69.2012.08.14.00.52.22 (version=SSLv3 cipher=OTHER); Tue, 14 Aug 2012 00:52:24 -0700 (PDT) Message-ID: <502A03B3.2030809@gmail.com> Date: Tue, 14 Aug 2012 08:06:00 -0000 From: xunxun User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Kai Tietz CC: Binutils , Nick Clifton Subject: Re: [patch ld]: Fix for bug ld/11539: ld --gc-sections should work for PE-COFF on MinGW References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00253.txt.bz2 Hello, Kai 于 2012/8/13 20:37, Kai Tietz 写道: > Hello, > > This patch addresses for pe-coff and pe+-coff the issue reported about > --gc-sections. > > I notice that the patch only modifies the linker script I remembered --gc-sections option is ignored by the linker on MinGW, so to enable the option also should modify libbfd? I saw the initial patch in ld/11539 also modify bfd, but I don't know whether the bfd part is fixed now. And you also added KEEP(*(.eh_frame*)) When I tested the KEEP half one year ago, I really found KEEP(*(.eh_frame*)) can make all --gc-sections target to work, but exe target using the KEEP will increase the size. Can we only use the KEEP to dll target? -- Best Regards, xunxun