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.
This commit is contained in:
parent
52cf9762c5
commit
83da6e748c
3 changed files with 25 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2016-02-10 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
2016-02-09 Nick Clifton <nickc@redhat.com>
|
2016-02-09 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* oasys.c (oasys_archive_p): Fix indentation.
|
* oasys.c (oasys_archive_p): Fix indentation.
|
||||||
|
|
|
@ -1369,14 +1369,26 @@ _bfd_elf_discard_section_eh_frame
|
||||||
&& ent->make_relative == 0)
|
&& ent->make_relative == 0)
|
||||||
|| (ent->fde_encoding & 0x70) == DW_EH_PE_aligned))
|
|| (ent->fde_encoding & 0x70) == DW_EH_PE_aligned))
|
||||||
{
|
{
|
||||||
|
static int num_warnings_issued = 0;
|
||||||
|
|
||||||
/* If a shared library uses absolute pointers
|
/* If a shared library uses absolute pointers
|
||||||
which we cannot turn into PC relative,
|
which we cannot turn into PC relative,
|
||||||
don't create the binary search table,
|
don't create the binary search table,
|
||||||
since it is affected by runtime relocations. */
|
since it is affected by runtime relocations. */
|
||||||
hdr_info->u.dwarf.table = FALSE;
|
hdr_info->u.dwarf.table = FALSE;
|
||||||
(*info->callbacks->einfo)
|
if (num_warnings_issued < 10)
|
||||||
(_("%P: FDE encoding in %B(%A) prevents .eh_frame_hdr"
|
{
|
||||||
" table being created.\n"), abfd, sec);
|
(*info->callbacks->einfo)
|
||||||
|
(_("%P: FDE encoding in %B(%A) prevents .eh_frame_hdr"
|
||||||
|
" table being created.\n"), abfd, sec);
|
||||||
|
num_warnings_issued ++;
|
||||||
|
}
|
||||||
|
else if (num_warnings_issued == 10)
|
||||||
|
{
|
||||||
|
(*info->callbacks->einfo)
|
||||||
|
(_("%P: Further warnings about FDE encoding preventing .eh_frame_hdr generation dropped.\n"));
|
||||||
|
num_warnings_issued ++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ent->removed = 0;
|
ent->removed = 0;
|
||||||
hdr_info->u.dwarf.fde_count++;
|
hdr_info->u.dwarf.fde_count++;
|
||||||
|
|
|
@ -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_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),
|
bfd_put_32 (sec->owner, word | ((value & 0xffff) << 6),
|
||||||
sec->contents + offset);
|
sec->contents + offset);
|
||||||
|
|
Loading…
Reference in a new issue