2005-07-08 Paul Koning <pkoning@equallogic.com>
* dwarf2.c (read_address): Check sign_extend_vma to handle targets where addresses are sign extended.
This commit is contained in:
parent
efd3631498
commit
0af4cd7c60
2 changed files with 33 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-07-08 Paul Koning <pkoning@equallogic.com>
|
||||
|
||||
* dwarf2.c (read_address): Check sign_extend_vma to handle targets
|
||||
where addresses are sign extended.
|
||||
|
||||
2005-07-08 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
|
||||
|
|
37
bfd/dwarf2.c
37
bfd/dwarf2.c
|
@ -347,16 +347,35 @@ read_indirect_string (struct comp_unit* unit,
|
|||
static bfd_uint64_t
|
||||
read_address (struct comp_unit *unit, bfd_byte *buf)
|
||||
{
|
||||
switch (unit->addr_size)
|
||||
int signed_vma = get_elf_backend_data (unit->abfd)->sign_extend_vma;
|
||||
|
||||
if (signed_vma)
|
||||
{
|
||||
case 8:
|
||||
return bfd_get_64 (unit->abfd, buf);
|
||||
case 4:
|
||||
return bfd_get_32 (unit->abfd, buf);
|
||||
case 2:
|
||||
return bfd_get_16 (unit->abfd, buf);
|
||||
default:
|
||||
abort ();
|
||||
switch (unit->addr_size)
|
||||
{
|
||||
case 8:
|
||||
return bfd_get_signed_64 (unit->abfd, buf);
|
||||
case 4:
|
||||
return bfd_get_signed_32 (unit->abfd, buf);
|
||||
case 2:
|
||||
return bfd_get_signed_16 (unit->abfd, buf);
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (unit->addr_size)
|
||||
{
|
||||
case 8:
|
||||
return bfd_get_64 (unit->abfd, buf);
|
||||
case 4:
|
||||
return bfd_get_32 (unit->abfd, buf);
|
||||
case 2:
|
||||
return bfd_get_16 (unit->abfd, buf);
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue