From patchwork Fri Nov 22 16:30:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 3223391 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5CC3FC045B for ; Fri, 22 Nov 2013 16:30:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 39F30207A1 for ; Fri, 22 Nov 2013 16:30:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 97EDB2079E for ; Fri, 22 Nov 2013 16:30:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753041Ab3KVQae (ORCPT ); Fri, 22 Nov 2013 11:30:34 -0500 Received: from mout.gmx.net ([212.227.17.21]:61779 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752565Ab3KVQad (ORCPT ); Fri, 22 Nov 2013 11:30:33 -0500 Received: from ls3530.dhcp.wdf.sap.corp ([155.56.40.73]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MJjUO-1VinAC1wo8-001Aqd for ; Fri, 22 Nov 2013 17:30:32 +0100 Date: Fri, 22 Nov 2013 17:30:31 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org, James Bottomley Subject: [PATCH] parisc: vmlinux.lds.S: use BSS_SECTION() and RO_DATA_SECTION() Message-ID: <20131122163031.GB10699@ls3530.dhcp.wdf.sap.corp> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Provags-ID: V03:K0:BDgfPGX84Xgd16SIV+X0S/VL/dVqytzzYLW5BHbQoByGSc+RUM/ sYrjRRMCoKmcsY0qTLxueFAeljEAa1W+fgio9YJIH3dxYSU3/tLjrFVcq2dqkNDdf+pmchR AQR1aBV5VlaVKG10Q4wl0Lj/QUStllg4cQsrUiOWMz0nbs3kxsB5bAjCj9KYIZH4dVT0Mow SS1jP/ozP31qK4pRhK33A== Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP - use predefined BSS_SECTION() and RO_DATA_SECTION() macros - join data sections: INIT_DATA_SECTION() and .exit.data - whitespace cleanups Signed-off-by: Helge Deller --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S index 4bb095a..f16fa7d 100644 --- a/arch/parisc/kernel/vmlinux.lds.S +++ b/arch/parisc/kernel/vmlinux.lds.S @@ -23,13 +23,23 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/* + * Put page table entries (swapper_pg_dir) as the first thing in .bss. This + * will ensure that it has .bss alignment (PAGE_SIZE). + */ +#define BSS_FIRST_SECTIONS *(.data..vm0.pmd) \ + *(.data..vm0.pgd) \ + *(.data..vm0.pte) + #include + /* needed for the processor specific cache alignment size */ #include #include #include #include - + /* ld script to make hppa Linux kernel */ #ifndef CONFIG_64BIT OUTPUT_FORMAT("elf32-hppa-linux") @@ -53,6 +63,7 @@ SECTIONS .head ALIGN(16) : { HEAD_TEXT } = 0 + .text ALIGN(16) : { TEXT_TEXT SCHED_TEXT @@ -74,7 +89,7 @@ SECTIONS /* Start of data section */ _sdata = .; - RODATA + RO_DATA_SECTION(PAGE_SIZE) /* writeable */ /* Make sure this is page aligned so @@ -107,29 +122,19 @@ SECTIONS _edata = .; /* BSS */ - __bss_start = .; - /* page table entries need to be PAGE_SIZE aligned */ - . = ALIGN(PAGE_SIZE); - .data..vmpages : { - *(.data..vm0.pmd) - *(.data..vm0.pgd) - *(.data..vm0.pte) - } - .bss : { - *(.bss) - *(COMMON) - } - __bss_stop = .; + BSS_SECTION(16, PAGE_SIZE, 16) + #ifdef CONFIG_64BIT + /* Linkage tables are huge. */ . = ALIGN(16); /* Linkage tables */ .opd : { *(.opd) - } PROVIDE (__gp = .); + } PROVIDE (__gp = .); .plt : { *(.plt) - } + } .dlt : { *(.dlt) } @@ -139,13 +144,12 @@ SECTIONS . = ALIGN(16384); __init_begin = .; INIT_TEXT_SECTION(16384) - . = ALIGN(PAGE_SIZE); - INIT_DATA_SECTION(16) /* we have to discard exit text and such at runtime, not link time */ .exit.text : { EXIT_TEXT } + INIT_DATA_SECTION(16) .exit.data : { EXIT_DATA