From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19809 invoked by alias); 11 Sep 2009 22:00:47 -0000 Received: (qmail 19777 invoked by uid 22791); 11 Sep 2009 22:00:44 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mailout01.t-online.de (HELO mailout01.t-online.de) (194.25.134.80) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Sep 2009 22:00:37 +0000 Received: from fwd07.aul.t-online.de by mailout01.t-online.de with smtp id 1MmEAU-0001sB-01; Sat, 12 Sep 2009 00:00:34 +0200 Received: from [10.3.2.2] (XRP7m6ZcghxJZLFg6LnLd1iLUL+FNaTSeAVoHyRUq9S-Hh69pfuc6XS7Z0w0e1CQjx@[217.235.217.194]) by fwd07.aul.t-online.de with esmtp id 1MmEAQ-216QWu0; Sat, 12 Sep 2009 00:00:30 +0200 Message-ID: <4AAAC87F.9010507@t-online.de> Date: Fri, 11 Sep 2009 22:00:00 -0000 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090403 SeaMonkey/1.1.16 MIME-Version: 1.0 To: Cygwin Subject: [1.7] binutils-2.19.51-1: ld -r bug ? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2009-09/txt/msg00264.txt.bz2 Testing build of grub 1.97 beta on Cygwin 1.7, I found that the grub .mod files are much larger than on 1.5. The modules are build by 'ld -r' (and later converted to ELF). The root of the problem is that the binutils-2.19.51-1 ld behavior differs from previous 1.5 binutils. The new ld increases the size of each segment by the size of the previous segment. Bug? Testcase: $ cat segm.c void text() { __asm__(".space 104"); } char data[256] = "DATA"; const char rdata[16] = "RDATA"; $ gcc -c segm.c cygwin-1.5: $ cygcheck -f /bin/ld binutils-20080624-2 $ ld -r -o segm-r5.o segm.o cygwin-1.7: $ cygcheck -f /bin/ld binutils-2.19.51-1 $ ld -r -o segm-r7.o segm.o $ size segm.o segm-*.o text data bss dec hex filename 128 256 0 384 180 segm.o 128 256 0 384 180 segm-r5.o 512 384 400 1296 510 segm-r7.o $ objdump -s segm-r*.o segm-r5.o: file format pe-i386 Contents of section .text: 0000 5589e500 00000000 00000000 00000000 U............... ... 0060 00000000 00000000 0000005d c3909090 ...........].... Contents of section .data: 0080 44415441 00000000 00000000 00000000 DATA............ ... 0170 00000000 00000000 00000000 00000000 ................ Contents of section .rdata: 0180 52444154 41000000 00000000 00000000 RDATA........... segm-r7.o: file format pe-i386 Contents of section .text: 0000 5589e500 00000000 00000000 00000000 U............... ... 0060 00000000 00000000 0000005d c3909090 ...........].... Contents of section .data: 0000 00000000 00000000 00000000 00000000 ................ ... 0080 44415441 00000000 00000000 00000000 DATA............ ... 0170 00000000 00000000 00000000 00000000 ................ Contents of section .rdata: 0000 00000000 00000000 00000000 00000000 ................ ... 0180 52444154 41000000 00000000 00000000 RDATA........... There are no related changes in the builtin linker scripts (ld --verbose -r). Christian -- 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