aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-11-04 10:45:54 +0000
committerAlan Modra <amodra@gmail.com>2003-11-04 10:45:54 +0000
commit140fae3fce0bbf08c28525467d85408dd355fe03 (patch)
tree7a69c80112b89a53035c3768e8c724fefec31bff /bfd
parent0f867abe4ab1bf1b680a54d930736b5180ecb7ab (diff)
downloadgdb-140fae3fce0bbf08c28525467d85408dd355fe03.zip
gdb-140fae3fce0bbf08c28525467d85408dd355fe03.tar.gz
gdb-140fae3fce0bbf08c28525467d85408dd355fe03.tar.bz2
* elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
"dereferencing type-punned pointer" warnings.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog11
-rw-r--r--bfd/elf-m10300.c12
2 files changed, 14 insertions, 9 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 835a8af..1bd4d56 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,8 @@
2003-11-04 Alan Modra <amodra@bigpond.net.au>
+ * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
+ "dereferencing type-punned pointer" warnings.
+
* aout-adobe.c (aout_adobe_set_section_contents): Constify location.
* aoutx.h (NAME(aout,set_section_contents)): Ditto.
* bfd-in2.h: Regenerate.
@@ -119,7 +122,7 @@
* section.c (bfd_set_section_contents): Make the "location" buffer
constant.
* bfd-in2.h: Re-generate.
-
+
2003-10-30 Andrew Cagney <cagney@redhat.com>
* syms.c: Replace "struct symbol_cache_entry" with "struct
@@ -200,8 +203,8 @@
2003-10-29 Daniel Jacobowitz <drow@mvista.com>
- * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
- SEC_ALLOC.
+ * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
+ SEC_ALLOC.
2003-10-29 Philip Blundell <philb@gnu.org>
@@ -220,7 +223,7 @@
(elf32_arm_check_relocs): Likewise.
(elf32_arm_adjust_dynamic_symbol): Likewise.
(elf32_arm_copy_indirect_symbol): New.
- (elf32_arm_link_hash_table_create): Initialise new fields.
+ (elf32_arm_link_hash_table_create): Initialise new fields.
(elf32_arm_gc_sweep_hook): Implement.
(elf32_arm_discard_copies): Delete.
(elf32_arm_finish_dynamic_symbol): Use new PLT code.
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index 9500573..19ba0d2 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -561,6 +561,7 @@ _bfd_mn10300_elf_create_got_section (abfd, info)
flagword flags;
flagword pltflags;
asection * s;
+ struct bfd_link_hash_entry * bh;
struct elf_link_hash_entry * h;
const struct elf_backend_data * bed = get_elf_backend_data (abfd);
int ptralign;
@@ -604,13 +605,13 @@ _bfd_mn10300_elf_create_got_section (abfd, info)
{
/* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
.plt section. */
- struct elf_link_hash_entry *h = NULL;
+ bh = NULL;
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;
@@ -638,12 +639,13 @@ _bfd_mn10300_elf_create_got_section (abfd, info)
(or .got.plt) section. We don't do this in the linker script
because we don't want to define the symbol if we are not creating
a global offset table. */
- h = NULL;
+ bh = NULL;
if (!(_bfd_generic_link_add_one_symbol
(info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
bed->got_symbol_offset, (const char *) NULL, FALSE,
- bed->collect, (struct bfd_link_hash_entry **) &h)))
+ bed->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;