From owner-cvs-src-old@FreeBSD.ORG Mon Jul 19 18:21:05 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CCCF1065670 for ; Mon, 19 Jul 2010 18:21:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ED1638FC14 for ; Mon, 19 Jul 2010 18:21:04 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JIL4m3089102 for ; Mon, 19 Jul 2010 18:21:04 GMT (envelope-from avg@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o6JIL4Jo089101 for cvs-src-old@freebsd.org; Mon, 19 Jul 2010 18:21:04 GMT (envelope-from avg@repoman.freebsd.org) Message-Id: <201007191821.o6JIL4Jo089101@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to avg@repoman.freebsd.org using -f From: Andriy Gapon Date: Mon, 19 Jul 2010 18:20:44 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/contrib/binutils/ld/emultempl elf32.em X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 18:21:05 -0000 avg 2010-07-19 18:20:44 UTC FreeBSD src repository Modified files: contrib/binutils/ld/emultempl elf32.em Log: SVN rev 210245 on 2010-07-19 18:20:44Z by avg binutils/ld: fix incorrect placement of __start_SECNAME in some cases __start_SECNAME and __stop_SECNAME symbols are automatically generated by ld for orphan sections, i.e. those not explicitely referenced by a linker script. The symbols are supposed to be placed correspondingly at the start and the end of the section in output file. In some cases __start_SECNAME may be placed at the address after the end of the previous section (if any) and before the start the section. This happens when following conditions are met: 1. the orphan section is found in more than one input file 2. the orphan section has different alignment requirements across input files 3. the first instance of the section encountered doesn't have the greatest alignment requirement In these conditions resulting output section will be placed at address after the end of the previous section aligned to the greatest alignment requirement in the inputs, but __start_SECNAME will be placed at address after the end of the previous section aligned to the alignment requirement of the first input in which the section is encountered. See commit message of r196118 for a concrete example of problems caused by this bug. The fix is to place __start_SECNAME inside the section and use ABSOLUTE directive, rather than placing __start_SECNAME outside the section and trying to guess address alignment. This fix is in line with upstream binutils change/fix made between versions 2.19 and 2.20 in revision of 1.307 ldlang.c. MFC after: 3 weeks Revision Changes Path 1.15 +20 -20 src/contrib/binutils/ld/emultempl/elf32.em