re PR lto/47264 (Many tests fail with -flto due unaligned load in lto-plugin.c)

2011-01-12  Richard Guenther  <rguenther@suse.de>

	PR lto/47264
	* lto-plugin.c (parse_table_entry): Use memcpy to access
	unaligned fields.

From-SVN: r168708
This commit is contained in:
Richard Guenther 2011-01-12 12:04:39 +00:00 committed by Richard Biener
parent 753cc6853b
commit 47782a9d27
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2011-01-12 Richard Guenther <rguenther@suse.de>
PR lto/47264
* lto-plugin.c (parse_table_entry): Use memcpy to access
unaligned fields.
2010-12-20 Dave Korn <dave.korn.cygwin@gmail.com>
* Makefile.am (AM_LIBTOOLFLAGS): Define, adding disable-static tag.

View File

@ -249,10 +249,10 @@ parse_table_entry (char *p, struct ld_plugin_symbol *entry,
entry->visibility = translate_visibility[t];
p++;
entry->size = *(uint64_t *) p;
memcpy (&entry->size, p, sizeof (uint64_t));
p += 8;
aux->slot = *(uint32_t *) p;
memcpy (&aux->slot, p, sizeof (uint32_t));
p += 4;
entry->resolution = LDPR_UNKNOWN;