Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2553)

Unified Diff: bfd/elf32-xgate.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bfd/elf32-xc16x.c ('k') | bfd/elf32-xstormy16.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bfd/elf32-xgate.c
diff --git a/bfd/elf32-xgate.c b/bfd/elf32-xgate.c
index bd62438eff46649ce52f31559ad5353888b9beab..b822260277ca30a290679d7d7649995d11b8f79b 100644
--- a/bfd/elf32-xgate.c
+++ b/bfd/elf32-xgate.c
@@ -106,8 +106,8 @@ static reloc_howto_type elf_xgate_howto_table[] =
bfd_elf_generic_reloc, /* special_function */
"R_XGATE_16", /* name */
FALSE, /* partial_inplace */
- 0x00ff, /* src_mask */
- 0x00ff, /* dst_mask */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
/* A 32 bit absolute relocation. This one is never used for the
@@ -437,7 +437,7 @@ xgate_elf_bfd_link_hash_table_free (struct bfd_link_hash_table *hash)
bfd_hash_table_free (ret->stub_hash_table);
free (ret->stub_hash_table);
- _bfd_generic_link_hash_table_free (hash);
+ _bfd_elf_link_hash_table_free (hash);
}
/* Create a XGATE ELF linker hash table. */
@@ -448,11 +448,10 @@ xgate_elf_bfd_link_hash_table_create (bfd *abfd)
struct xgate_elf_link_hash_table *ret;
bfd_size_type amt = sizeof(struct xgate_elf_link_hash_table);
- ret = (struct xgate_elf_link_hash_table *) bfd_malloc (amt);
+ ret = (struct xgate_elf_link_hash_table *) bfd_zmalloc (amt);
if (ret == (struct xgate_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, sizeof(struct elf_link_hash_entry),
XGATE_ELF_DATA))
@@ -463,7 +462,7 @@ xgate_elf_bfd_link_hash_table_create (bfd *abfd)
/* Init the stub hash table too. */
amt = sizeof(struct bfd_hash_table);
- ret->stub_hash_table = (struct bfd_hash_table*) bfd_malloc (amt);
+ ret->stub_hash_table = (struct bfd_hash_table*) bfd_zmalloc (amt);
if (ret->stub_hash_table == NULL)
{
free (ret);
@@ -472,12 +471,11 @@ xgate_elf_bfd_link_hash_table_create (bfd *abfd)
if (!bfd_hash_table_init (ret->stub_hash_table, stub_hash_newfunc,
sizeof(struct elf32_xgate_stub_hash_entry)))
- return NULL;
-
- ret->stub_bfd = NULL;
- ret->stub_section = 0;
- ret->add_stub_section = NULL;
- ret->sym_cache.abfd = NULL;
+ {
+ free (ret->stub_hash_table);
+ free (ret);
+ return NULL;
+ }
return &ret->root.root;
}
« no previous file with comments | « bfd/elf32-xc16x.c ('k') | bfd/elf32-xstormy16.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698