From owner-svn-src-projects@FreeBSD.ORG Thu Nov 4 18:57:52 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A1AA106566B; Thu, 4 Nov 2010 18:57:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E9288FC0A; Thu, 4 Nov 2010 18:57:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oA4IvqYY069761; Thu, 4 Nov 2010 18:57:52 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oA4IvqUr069759; Thu, 4 Nov 2010 18:57:52 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201011041857.oA4IvqUr069759@svn.freebsd.org> From: Dimitry Andric Date: Thu, 4 Nov 2010 18:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214799 - projects/binutils-2.17/sys/conf X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Nov 2010 18:57:52 -0000 Author: dim Date: Thu Nov 4 18:57:51 2010 New Revision: 214799 URL: http://svn.freebsd.org/changeset/base/214799 Log: Binutils commit 0c845abb5a0083c6deebc75975608237015badba increased ELF_MAXPAGESIZE for amd64 from 0x00100000 to 0x00200000. This caused the kernel to be incorrectly linked, using the existing linker script, resulting in a virtual address of 0xffffffff80000000 for the LOAD program header. The boot loader will load such a kernel at a real address of 0x00000000, which either causes protection faults in btx, crashes the machine, or (in case of a VMware guest) even makes it power down. :) Fix this by partially synchronizing the amd64 linker script with binutils own updated version, in particular replacing a hardcoded value of 0x00100000 by CONSTANT(MAXPAGESIZE). Modified: projects/binutils-2.17/sys/conf/ldscript.amd64 Modified: projects/binutils-2.17/sys/conf/ldscript.amd64 ============================================================================== --- projects/binutils-2.17/sys/conf/ldscript.amd64 Thu Nov 4 18:43:57 2010 (r214798) +++ projects/binutils-2.17/sys/conf/ldscript.amd64 Thu Nov 4 18:57:51 2010 (r214799) @@ -6,7 +6,7 @@ SEARCH_DIR("/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - . = kernbase + 0x00100000 + SIZEOF_HEADERS; + . = kernbase + CONSTANT (MAXPAGESIZE) + SIZEOF_HEADERS; .interp : { *(.interp) } .hash : { *(.hash) } .dynsym : { *(.dynsym) } @@ -61,7 +61,8 @@ SECTIONS .eh_frame_hdr : { *(.eh_frame_hdr) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ - . = DATA_SEGMENT_ALIGN(0x100000, 0x1000); + . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); + . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); /* Ensure the __preinit_array_start label is properly aligned. We could instead move the label definition inside the section, but the linker would then create the section even if it turns out to