This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] S12Z: Set eh_addr_size to 4
- From: John Darrington <john at darrington dot wattle dot id dot au>
- To: binutils at sourceware dot org
- Cc: John Darrington <john at darrington dot wattle dot id dot au>
- Date: Wed, 3 Oct 2018 13:55:46 +0200
- Subject: [PATCH] S12Z: Set eh_addr_size to 4
- References: <20181003115546.10715-1-john@darrington.wattle.id.au>
---
binutils/objdump.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/binutils/objdump.c b/binutils/objdump.c
index f468fcdb59..d3ab2e4cd1 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -2711,6 +2711,11 @@ dump_dwarf (bfd *abfd)
eh_addr_size = bfd_arch_bits_per_address (abfd) / 8;
+ /* S12Z has a 24 bit address space. But the only known
+ producer of dwarf_info encodes addresses into 32 bits. */
+ if (bfd_get_arch (abfd) == bfd_arch_s12z)
+ eh_addr_size = 4;
+
if (bfd_big_endian (abfd))
byte_get = byte_get_big_endian;
else if (bfd_little_endian (abfd))
--
2.11.0