diff options
author | Alan Modra <amodra@gmail.com> | 2002-10-11 08:33:11 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-10-11 08:33:11 +0000 |
commit | 14a793b2f2d16ac51e6ac53e817a60a520a83200 (patch) | |
tree | f61585eba76e731da279ee2a157c23c0496c0354 /bfd/elf32-arm.h | |
parent | 2d801b0fa01bf6af6d34f000ab55096ff1064acc (diff) | |
download | gdb-14a793b2f2d16ac51e6ac53e817a60a520a83200.zip gdb-14a793b2f2d16ac51e6ac53e817a60a520a83200.tar.gz gdb-14a793b2f2d16ac51e6ac53e817a60a520a83200.tar.bz2 |
Fix numerous occurrences of
warning: dereferencing type-punned pointer will break strict-aliasing rules
Diffstat (limited to 'bfd/elf32-arm.h')
-rw-r--r-- | bfd/elf32-arm.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h index 2d59601..029bbe2 100644 --- a/bfd/elf32-arm.h +++ b/bfd/elf32-arm.h @@ -427,6 +427,7 @@ record_arm_to_thumb_glue (link_info, h) asection * s; char * tmp_name; struct elf_link_hash_entry * myh; + struct bfd_link_hash_entry * bh; struct elf32_arm_link_hash_table * globals; bfd_vma val; @@ -460,11 +461,11 @@ record_arm_to_thumb_glue (link_info, h) /* The only trick here is using hash_table->arm_glue_size as the value. Even though the section isn't allocated yet, this is where we will be putting it. */ + bh = NULL; val = globals->arm_glue_size + 1; _bfd_generic_link_add_one_symbol (link_info, globals->bfd_of_glue_owner, tmp_name, BSF_GLOBAL, s, val, - NULL, true, false, - (struct bfd_link_hash_entry **) &myh); + NULL, true, false, &bh); free (tmp_name); @@ -482,6 +483,7 @@ record_thumb_to_arm_glue (link_info, h) asection *s; char *tmp_name; struct elf_link_hash_entry *myh; + struct bfd_link_hash_entry *bh; struct elf32_arm_link_hash_table *hash_table; char bind; bfd_vma val; @@ -513,13 +515,14 @@ record_thumb_to_arm_glue (link_info, h) return; } + bh = NULL; val = hash_table->thumb_glue_size + 1; _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner, tmp_name, BSF_GLOBAL, s, val, - NULL, true, false, - (struct bfd_link_hash_entry **) &myh); + NULL, true, false, &bh); /* If we mark it 'Thumb', the disassembler will do a better job. */ + myh = (struct elf_link_hash_entry *) bh; bind = ELF_ST_BIND (myh->type); myh->type = ELF_ST_INFO (bind, STT_ARM_TFUNC); @@ -536,13 +539,11 @@ record_thumb_to_arm_glue (link_info, h) sprintf (tmp_name, CHANGE_TO_ARM, name); - myh = NULL; - + bh = NULL; val = hash_table->thumb_glue_size + 4, _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner, tmp_name, BSF_LOCAL, s, val, - NULL, true, false, - (struct bfd_link_hash_entry **) &myh); + NULL, true, false, &bh); free (tmp_name); |