From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23949 invoked by alias); 24 Dec 2007 17:21:03 -0000 Received: (qmail 23941 invoked by uid 22791); 24 Dec 2007 17:21:03 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 24 Dec 2007 17:20:59 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id lBOHKuCn003792; Mon, 24 Dec 2007 12:20:56 -0500 Received: from pobox.fab.redhat.com (pobox.fab.redhat.com [10.33.63.12]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lBOHKtTf008385; Mon, 24 Dec 2007 12:20:55 -0500 Received: from [10.32.4.26] (vpn-4-26.str.redhat.com [10.32.4.26]) by pobox.fab.redhat.com (8.13.1/8.13.1) with ESMTP id lBOHKsPR010221; Mon, 24 Dec 2007 12:20:54 -0500 Message-ID: <476FEA82.1070501@redhat.com> Date: Mon, 24 Dec 2007 17:21:00 -0000 From: Nick Clifton User-Agent: Thunderbird 1.5.0.12 (X11/20071018) MIME-Version: 1.0 To: "DeRosa, Anthony" CC: binutils@sourceware.org Subject: Re: LMA XXX Overlaps Previous Sections When Using PHDRS References: <3517CACAE247DD498B74D4B65A379E95270856@corpcboemb01.edocorp.com> In-Reply-To: <3517CACAE247DD498B74D4B65A379E95270856@corpcboemb01.edocorp.com> Content-Type: multipart/mixed; boundary="------------000607090106050800070202" 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: 2007-12/txt/msg00144.txt.bz2 This is a multi-part message in MIME format. --------------000607090106050800070202 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 523 Hi Anthony, > /opt/cross-tools/binutils-2.17-gcc-4.1.1-newlib-1.14.0/lib/gcc/i686-elf/ > 4.1.1/../../../../i686-elf/bin/ld: test.elf: section .section_0 lma > 0x1000 overlaps previous sections This is a bogus error message due to a spurious check in the linker. Please try the attached patch and let me know if you have any problems. Cheers Nick bfd/ChangeLog 2007-12-24 Nick Clifton * elf.c (assign_file_positions_for_load_sections): Do not complain when then LMA is lower than the VMA. --------------000607090106050800070202 Content-Type: text/x-patch; name="elf.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="elf.c.patch" Content-length: 1111 Index: bfd/elf.c =================================================================== RCS file: /cvs/src/src/bfd/elf.c,v retrieving revision 1.426 diff -c -3 -p -r1.426 elf.c *** bfd/elf.c 11 Dec 2007 13:13:59 -0000 1.426 --- bfd/elf.c 24 Dec 2007 17:18:50 -0000 *************** assign_file_positions_for_load_sections *** 4339,4357 **** && ((this_hdr->sh_flags & SHF_TLS) == 0 || p->p_type == PT_TLS))) { ! if (adjust < 0) { ! (*_bfd_error_handler) ! (_("%B: section %A lma 0x%lx overlaps previous sections"), ! abfd, sec, (unsigned long) sec->lma); ! adjust = 0; ! } ! p->p_memsz += adjust; ! if (this_hdr->sh_type != SHT_NOBITS) ! { ! off += adjust; ! p->p_filesz += adjust; } } } --- 4339,4353 ---- && ((this_hdr->sh_flags & SHF_TLS) == 0 || p->p_type == PT_TLS))) { ! if (adjust > 0) { ! p->p_memsz += adjust; ! if (this_hdr->sh_type != SHT_NOBITS) ! { ! off += adjust; ! p->p_filesz += adjust; ! } } } } --------------000607090106050800070202--