diff options
author | Mark Kettenis <kettenis@gnu.org> | 2003-05-18 09:44:56 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2003-05-18 09:44:56 +0000 |
commit | 7dd505bf5251e192fabc9d34d6add6bd9169496d (patch) | |
tree | 7f2fc48428d902f844d0583b3980e3278921cacb /bfd/elf32-m68hc1x.c | |
parent | 44ecb9cd26e0555d48721af7eab860945210c4d8 (diff) | |
download | gdb-7dd505bf5251e192fabc9d34d6add6bd9169496d.tar.gz |
2003-05-18 Mark Kettenis <kettenis@gnu.org>
Merge from mainline.
* i386-tdep.h (I386_SIZEOF_GREGS, I386_SIZEOF_FREGS,
I386_SIZEOF_XREGS): Remove defenitions.
(IS_FP_REGNUM, IS_SSE_REGNUM): Remove definitions.
* i386-tdep.c (i386_gdbarch_init): Don't set register_bytes,
register_size, call_dummy_words and sizeof_call_dummy.
* i386-linux-tdep.c (i386_linux_init_abi): Don't set register_bytes.
* x86-64-tdep.c (x86_64_init_abi): Don't set register_bytes and
register_size.
(x86_64_register_bytes): Remove variable.
(_initialize_x86_64_tdep): Remove function.
* i386-linux-tdep.c (i386_linux_sigcontext_addr): Call read_memory
with correct arguments.
* config/i386/x86-64linux.mt (TDEPFILES): Add i386-linux-tdep.o.
Diffstat (limited to 'bfd/elf32-m68hc1x.c')
-rw-r--r-- | bfd/elf32-m68hc1x.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c index 0696a364251..176a256c744 100644 --- a/bfd/elf32-m68hc1x.c +++ b/bfd/elf32-m68hc1x.c @@ -75,14 +75,15 @@ m68hc11_elf_hash_table_create (abfd) struct m68hc11_elf_link_hash_table *ret; bfd_size_type amt = sizeof (struct m68hc11_elf_link_hash_table); - ret = (struct m68hc11_elf_link_hash_table *) bfd_zalloc (abfd, amt); + ret = (struct m68hc11_elf_link_hash_table *) bfd_malloc (amt); if (ret == (struct m68hc11_elf_link_hash_table *) NULL) return NULL; + memset (ret, 0, amt); if (! _bfd_elf_link_hash_table_init (&ret->root, abfd, _bfd_elf_link_hash_newfunc)) { - bfd_release (abfd, ret); + free (ret); return NULL; } @@ -91,7 +92,7 @@ m68hc11_elf_hash_table_create (abfd) ret->stub_hash_table = (struct bfd_hash_table*) bfd_malloc (amt); if (ret->stub_hash_table == NULL) { - bfd_release (abfd, ret); + free (ret); return NULL; } if (!bfd_hash_table_init (ret->stub_hash_table, stub_hash_newfunc)) @@ -476,9 +477,9 @@ elf32_m68hc11_size_stubs (output_bfd, stub_bfd, info, add_stub_section) /* Get the relocs. */ internal_relocs - = _bfd_elf32_link_read_relocs (input_bfd, section, NULL, - (Elf_Internal_Rela *) NULL, - info->keep_memory); + = _bfd_elf_link_read_relocs (input_bfd, section, NULL, + (Elf_Internal_Rela *) NULL, + info->keep_memory); if (internal_relocs == NULL) goto error_ret_free_local; @@ -1405,6 +1406,21 @@ _bfd_m68hc11_elf_merge_private_bfd_data (ibfd, obfd) bfd_archive_filename (ibfd)); ok = FALSE; } + + /* Processor compatibility. */ + if (!EF_M68HC11_CAN_MERGE_MACH (new_flags, old_flags)) + { + (*_bfd_error_handler) + (_("%s: linking files compiled for HCS12 with " + "others compiled for HC12"), + bfd_archive_filename (ibfd)); + ok = FALSE; + } + new_flags = ((new_flags & ~EF_M68HC11_MACH_MASK) + | (EF_M68HC11_MERGE_MACH (new_flags, old_flags))); + + elf_elfheader (obfd)->e_flags = new_flags; + new_flags &= ~EF_M68HC11_ABI; old_flags &= ~EF_M68HC11_ABI; |