mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
Fix linker error found when compiling glibc with a mismatched gcc.
* dwarf2.c (scan_unit_for_symbols, case DT_AT_location): Verify that DW_OP_addr is only opcode in location before using it.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2005-08-10 James E. Wilson <wilson@specifix.com>
|
||||||
|
|
||||||
|
* dwarf2.c (scan_unit_for_symbols, case DT_AT_location): Verify that
|
||||||
|
DW_OP_addr is only opcode in location before using it.
|
||||||
|
|
||||||
2005-08-09 H.J. Lu <hongjiu.lu@intel.com>
|
2005-08-09 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* elfxx-ia64.c (elfNN_ia64_final_link): Reset gp.
|
* elfxx-ia64.c (elfNN_ia64_final_link): Reset gp.
|
||||||
|
14
bfd/dwarf2.c
14
bfd/dwarf2.c
@ -1782,9 +1782,17 @@ scan_unit_for_symbols (struct comp_unit *unit)
|
|||||||
if (*attr.u.blk->data == DW_OP_addr)
|
if (*attr.u.blk->data == DW_OP_addr)
|
||||||
{
|
{
|
||||||
var->stack = 0;
|
var->stack = 0;
|
||||||
var->addr = bfd_get ((attr.u.blk->size - 1) * 8,
|
|
||||||
unit->abfd,
|
/* Verify that DW_OP_addr is the only opcode in the
|
||||||
attr.u.blk->data + 1);
|
location, in which case the block size will be 1
|
||||||
|
plus the address size. */
|
||||||
|
/* ??? For TLS variables, gcc can emit
|
||||||
|
DW_OP_addr <addr> DW_OP_GNU_push_tls_address
|
||||||
|
which we don't handle here yet. */
|
||||||
|
if (attr.u.blk->size == unit->addr_size + 1U)
|
||||||
|
var->addr = bfd_get (unit->addr_size * 8,
|
||||||
|
unit->abfd,
|
||||||
|
attr.u.blk->data + 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user