aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-v850.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-10-15 21:33:38 +1030
committerAlan Modra <amodra@gmail.com>2015-10-15 23:38:29 +1030
commite43fb83166ca5610e34cfba1dcf1216d0953aa8c (patch)
tree37a35c1e87197ef652900c8aec45d250d2f97896 /bfd/elf32-v850.c
parent38bc821765fd286a12d6934a4d9e4369fda64b41 (diff)
downloadgdb-e43fb83166ca5610e34cfba1dcf1216d0953aa8c.zip
gdb-e43fb83166ca5610e34cfba1dcf1216d0953aa8c.tar.gz
gdb-e43fb83166ca5610e34cfba1dcf1216d0953aa8c.tar.bz2
objcopy --extract-symbol
Calling bfd_copy_private_bfd_data is necessary to copy ELF file header info. binutils/ * objcopy.c (copy_object): Don't omit bfd_copy_private_bfd_data call when extract_symbol. bfd/ * elf32-v850.c (v850_elf_copy_private_bfd_data): Remove assertion that input and output .note.renesas sections are same size. Instead, only copy input to output if they are.
Diffstat (limited to 'bfd/elf32-v850.c')
-rw-r--r--bfd/elf32-v850.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index c6a6d2f..4773324 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -2442,13 +2442,14 @@ v850_elf_copy_private_bfd_data (bfd * ibfd, bfd * obfd)
if ((onotes = bfd_get_section_by_name (obfd, V850_NOTE_SECNAME)) == NULL)
return TRUE;
- if ((inotes = bfd_get_section_by_name (ibfd, V850_NOTE_SECNAME)) != NULL)
+ if ((inotes = bfd_get_section_by_name (ibfd, V850_NOTE_SECNAME)) == NULL)
+ return TRUE;
+
+ if (bfd_section_size (ibfd, inotes) == bfd_section_size (obfd, onotes))
{
bfd_byte * icont;
bfd_byte * ocont;
- BFD_ASSERT (bfd_section_size (ibfd, inotes) == bfd_section_size (obfd, onotes));
-
if ((icont = elf_section_data (inotes)->this_hdr.contents) == NULL)
BFD_ASSERT (bfd_malloc_and_get_section (ibfd, inotes, & icont));