This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
aliasing fix for m32r
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Tue, 16 Mar 2004 12:18:59 +1030
- Subject: aliasing fix for m32r
Fixes "type-punned pointer will break strict-aliasing rules" warning.
* elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
aliasing warning. Remove trailing whitespace throughout file.
Index: bfd/elf32-m32r.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m32r.c,v
retrieving revision 1.39
diff -u -p -r1.39 elf32-m32r.c
--- bfd/elf32-m32r.c 19 Dec 2003 11:43:53 -0000 1.39
+++ bfd/elf32-m32r.c 15 Mar 2004 13:02:05 -0000
@@ -1730,13 +1730,14 @@ m32r_elf_create_dynamic_sections (abfd,
{
/* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
.plt section. */
- struct elf_link_hash_entry *h = NULL;
+ struct bfd_link_hash_entry *bh = NULL;
+ struct elf_link_hash_entry *h;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s,
(bfd_vma) 0, (const char *) NULL, FALSE,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
+ get_elf_backend_data (abfd)->collect, &bh)))
return FALSE;
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
--
Alan Modra
IBM OzLabs - Linux Technology Centre