aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-nios2.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-02-10 11:25:59 +0000
committerNick Clifton <nickc@redhat.com>2016-02-10 11:25:59 +0000
commit83da6e748c8f105f07e17f53aa6b99ed7867ff5f (patch)
tree32c3444b907e33d0a44d143ed52a7908bceadc42 /bfd/elf32-nios2.c
parent52cf9762c53f5de7070a3951a3a6156082839d35 (diff)
downloadfsf-binutils-gdb-83da6e748c8f105f07e17f53aa6b99ed7867ff5f.zip
fsf-binutils-gdb-83da6e748c8f105f07e17f53aa6b99ed7867ff5f.tar.gz
fsf-binutils-gdb-83da6e748c8f105f07e17f53aa6b99ed7867ff5f.tar.bz2
Correct assertion in NIOS2 linker to allow signed 16-buit immediate values.
PR 19405 * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed immediate values. * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the number of messages about FDE encoding preventing .eh_frame_hdr generation.
Diffstat (limited to 'bfd/elf32-nios2.c')
-rw-r--r--bfd/elf32-nios2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
index 3f72b11..b19169c 100644
--- a/bfd/elf32-nios2.c
+++ b/bfd/elf32-nios2.c
@@ -1905,7 +1905,7 @@ nios2_elf32_install_imm16 (asection *sec, bfd_vma offset, bfd_vma value)
{
bfd_vma word = bfd_get_32 (sec->owner, sec->contents + offset);
- BFD_ASSERT(value <= 0xffff);
+ BFD_ASSERT (value <= 0xffff || ((bfd_signed_vma) value) >= -0xffff);
bfd_put_32 (sec->owner, word | ((value & 0xffff) << 6),
sec->contents + offset);