diff options
author | Alan Modra <amodra@bigpond.net.au> | 2002-10-11 08:33:11 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2002-10-11 08:33:11 +0000 |
commit | 1fe1537187058697547bd6155b713986813378f3 (patch) | |
tree | 2da28bb892d4d73c736152edb4a08146123249ee /bfd/elf32-arm.h | |
parent | 976c92ec4249ff7e307bcf278a49e90f78f0d768 (diff) | |
download | gdb-1fe1537187058697547bd6155b713986813378f3.tar.gz |
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 2d59601fd02..029bbe2513b 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); |