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

Unified Diff: bfd/elf32-m32r.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-m32c.c ('k') | bfd/elf32-m68hc1x.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bfd/elf32-m32r.c
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index e3e3bb051b5e300b87a6bc69dcb35998c150f24b..71e8fc781f86f6f5696e798c2cd253f69403c4e6 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -1,6 +1,5 @@
/* M32R-specific support for 32-bit ELF.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ Copyright 1996-2013 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -1390,7 +1389,8 @@ m32r_elf_add_symbol_hook (bfd *abfd,
flags);
if (s == NULL)
return FALSE;
- bfd_set_section_alignment (abfd, s, 2);
+ if (! bfd_set_section_alignment (abfd, s, 2))
+ return FALSE;
}
bh = bfd_link_hash_lookup (info->hash, "_SDA_BASE_",
@@ -1585,7 +1585,7 @@ m32r_elf_link_hash_table_create (bfd *abfd)
struct elf_m32r_link_hash_table *ret;
bfd_size_type amt = sizeof (struct elf_m32r_link_hash_table);
- ret = bfd_malloc (amt);
+ ret = bfd_zmalloc (amt);
if (ret == NULL)
return NULL;
@@ -1598,15 +1598,6 @@ m32r_elf_link_hash_table_create (bfd *abfd)
return NULL;
}
- ret->sgot = NULL;
- ret->sgotplt = NULL;
- ret->srelgot = NULL;
- ret->splt = NULL;
- ret->srelplt = NULL;
- ret->sdynbss = NULL;
- ret->srelbss = NULL;
- ret->sym_cache.abfd = NULL;
-
return &ret->root.root;
}
@@ -3295,8 +3286,7 @@ m32r_elf_finish_dynamic_symbol (bfd *output_bfd,
}
/* Mark some specially defined symbols as absolute. */
- if (strcmp (h->root.root.string, "_DYNAMIC") == 0
- || h == htab->root.hgot)
+ if (h == htab->root.hdynamic || h == htab->root.hgot)
sym->st_shndx = SHN_ABS;
return TRUE;
@@ -3756,6 +3746,10 @@ m32r_elf_check_relocs (bfd *abfd,
while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ /* PR15323, ref flags aren't set for references in the same
+ object. */
+ h->root.non_ir_ref = 1;
}
/* Some relocs require a global offset table. */
@@ -3991,7 +3985,9 @@ static const struct bfd_elf_special_section m32r_elf_special_sections[] =
};
static enum elf_reloc_type_class
-m32r_elf_reloc_type_class (const Elf_Internal_Rela *rela)
+m32r_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ const asection *rel_sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *rela)
{
switch ((int) ELF32_R_TYPE (rela->r_info))
{
« no previous file with comments | « bfd/elf32-m32c.c ('k') | bfd/elf32-m68hc1x.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698