This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/38995] lto1 uses unaligned data accesses
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jan 2009 01:41:23 -0000
- Subject: [Bug lto/38995] lto1 uses unaligned data accesses
- References: <bug-38995-50@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from hjl dot tools at gmail dot com 2009-01-30 01:41 -------
I am testing this patch:
Index: gcc/langhooks.c
===================================================================
--- gcc/langhooks.c (revision 143777)
+++ gcc/langhooks.c (working copy)
@@ -612,6 +612,7 @@
/* Create a new section and switch to it. */
section = get_section (name, SECTION_DEBUG, NULL);
switch_to_section (section);
+ assemble_align (POINTER_SIZE);
}
Index: gcc/lto/lto-elf.c
===================================================================
--- gcc/lto/lto-elf.c (revision 143777)
+++ gcc/lto/lto-elf.c (working copy)
@@ -245,6 +245,7 @@
\
shdr->sh_name = sh_name; \
shdr->sh_type = sh_type; \
+ shdr->sh_addralign = POINTER_SIZE; \
shdr->sh_flags = 0; \
shdr->sh_entsize = 0; \
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38995