Patchwork java: Align data in .rodata.jutf8.* sections.

login
register
mail settings
Submitter David Daney
Date Aug. 6, 2010, 4:15 a.m.
Message ID <4C5B8C73.7010103@gmail.com>
Download mbox | patch
Permalink /patch/61061/
State New
Headers show

Comments

David Daney - Aug. 6, 2010, 4:15 a.m.
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 <ddaney@caviumnetworks.com>

     * class.c (build_utf8_ref): Fix code formatting from previous commit.

2010-08-05  David Daney <ddaney@caviumnetworks.com>

     * 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)
     {

Patch

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)
     {