From patchwork Fri Aug 6 04:15:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 61061 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id E4017B6EEB for ; Fri, 6 Aug 2010 14:16:18 +1000 (EST) Received: (qmail 4967 invoked by alias); 6 Aug 2010 04:16:08 -0000 Received: (qmail 4934 invoked by uid 22791); 6 Aug 2010 04:16:01 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-iw0-f175.google.com (HELO mail-iw0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Aug 2010 04:15:57 +0000 Received: by iwn38 with SMTP id 38so858457iwn.20 for ; Thu, 05 Aug 2010 21:15:50 -0700 (PDT) Received: by 10.231.173.9 with SMTP id n9mr13055661ibz.146.1281068150147; Thu, 05 Aug 2010 21:15:50 -0700 (PDT) Received: from dd_xps.caveonetworks.com (adsl-67-127-52-52.dsl.pltn13.pacbell.net [67.127.52.52]) by mx.google.com with ESMTPS id h8sm776284ibk.15.2010.08.05.21.15.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 05 Aug 2010 21:15:49 -0700 (PDT) Message-ID: <4C5B8C73.7010103@gmail.com> Date: Thu, 05 Aug 2010 21:15:47 -0700 From: David Daney User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100720 Fedora/3.1.1-1.fc13 Thunderbird/3.1.1 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org Subject: [Patch] java: Align data in .rodata.jutf8.* sections. Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org FYI: I finally committed this (with the bonus formatting correction patch). It was approved by Tom Tromey back in: http://gcc.gnu.org/ml/java-patches/2010-q2/msg00006.html Tested on x86_64-unknown-linux-gnu and mips64-unknown-linux-gnu. It saves 1MB (out of 30) in libgcj.so's .text on mips64-linux. No change on x86_64. 2010-08-05 David Daney * class.c (build_utf8_ref): Fix code formatting from previous commit. 2010-08-05 David Daney * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN. Index: class.c =================================================================== --- class.c (revision 162930) +++ class.c (revision 162931) @@ -983,7 +983,7 @@ build_utf8_ref (tree name) TREE_READONLY (decl) = 1; TREE_THIS_VOLATILE (decl) = 0; DECL_INITIAL (decl) = cinit; - DECL_USER_ALIGN(decl) = 1; + DECL_USER_ALIGN (decl) = 1; if (HAVE_GAS_SHF_MERGE) { Index: class.c =================================================================== --- class.c (revision 162929) +++ class.c (revision 162930) @@ -983,6 +983,7 @@ build_utf8_ref (tree name) TREE_READONLY (decl) = 1; TREE_THIS_VOLATILE (decl) = 0; DECL_INITIAL (decl) = cinit; + DECL_USER_ALIGN(decl) = 1; if (HAVE_GAS_SHF_MERGE) {