summaryrefslogtreecommitdiff
path: root/bfd/coff-arm.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2002-10-11 08:33:11 +0000
committerAlan Modra <amodra@bigpond.net.au>2002-10-11 08:33:11 +0000
commit2a14282fa1fdce81d949dd8ee86b54898073ec0a (patch)
tree507ec00957a8442f4809895bba63fc039c21f393 /bfd/coff-arm.c
parent51d4a85da5d64b4603e8cd72a6a513ad5294738b (diff)
downloadbinutils-redhat-2a14282fa1fdce81d949dd8ee86b54898073ec0a.tar.gz
Fix numerous occurrences of
warning: dereferencing type-punned pointer will break strict-aliasing rules
Diffstat (limited to 'bfd/coff-arm.c')
-rw-r--r--bfd/coff-arm.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index 5e7f907a95..25256a8b7b 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -1881,6 +1881,7 @@ record_arm_to_thumb_glue (info, h)
register asection * s;
char * tmp_name;
struct coff_link_hash_entry * myh;
+ struct bfd_link_hash_entry * bh;
struct coff_arm_link_hash_table * globals;
bfd_vma val;
bfd_size_type amt;
@@ -1915,10 +1916,10 @@ record_arm_to_thumb_glue (info, h)
though the section isn't allocated yet, this is where we will be putting
it. */
+ bh = NULL;
val = globals->arm_glue_size + 1;
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
- BSF_GLOBAL, s, val, NULL, true, false,
- (struct bfd_link_hash_entry **) & myh);
+ BSF_GLOBAL, s, val, NULL, true, false, &bh);
free (tmp_name);
@@ -1937,6 +1938,7 @@ record_thumb_to_arm_glue (info, h)
register asection * s;
char * tmp_name;
struct coff_link_hash_entry * myh;
+ struct bfd_link_hash_entry * bh;
struct coff_arm_link_hash_table * globals;
bfd_vma val;
bfd_size_type amt;
@@ -1967,12 +1969,13 @@ record_thumb_to_arm_glue (info, h)
return; /* we've already seen this guy */
}
+ bh = NULL;
val = globals->thumb_glue_size + 1;
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
- BSF_GLOBAL, s, val, NULL, true, false,
- (struct bfd_link_hash_entry **) &myh);
+ BSF_GLOBAL, s, val, NULL, true, false, &bh);
/* If we mark it 'thumb', the disassembler will do a better job. */
+ myh = (struct coff_link_hash_entry *) bh;
myh->class = C_THUMBEXTFUNC;
free (tmp_name);
@@ -1989,11 +1992,10 @@ record_thumb_to_arm_glue (info, h)
sprintf (tmp_name, globals->support_old_code ? BACK_FROM_ARM : CHANGE_TO_ARM, name);
- myh = NULL;
+ bh = NULL;
val = globals->thumb_glue_size + (globals->support_old_code ? 8 : 4);
bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name,
- BSF_LOCAL, s, val, NULL, true, false,
- (struct bfd_link_hash_entry **) & myh);
+ BSF_LOCAL, s, val, NULL, true, false, &bh);
free (tmp_name);