summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2017-11-24 11:18:39 +0100
committerMark Wielaard <mark@klomp.org>2018-04-03 13:13:07 +0200
commit4a97eb02bb0bcd6562f8777596e3bbad0045d7a4 (patch)
tree373e25c5b122ecd4e98490769c29c719024234aa /src
parent402b7f76c51d05bbba5b16827779359bd797c7b0 (diff)
downloadelfutils-4a97eb02bb0bcd6562f8777596e3bbad0045d7a4.tar.gz
libdw: Add support for reading DW_FORM_addrx[1234] in .debug_addr.
Recognize the new .debug_addr section. The CU will now hold a new address base offset in that section for that CU. dwarf_form_addr will decode DW_FORM_addrx[1234] and return addresses using that address base from the .debug_addr. A new internal function read_3ubyte_unaligned will try to read a 24-bit value depending on endianness of the underlying file. Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/readelf.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e8bd6bf1..3ca090dc 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2018-03-22 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (attr_callback): Handle DW_FORM_addrx[1234].
+
2018-03-28 Mark Wielaard <mark@klomp.org>
* readelf.c (handle_sysv_hash): Break bucket chain after nchain
diff --git a/src/readelf.c b/src/readelf.c
index 226b19be..9210b2ac 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -6072,6 +6072,11 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
switch (form)
{
case DW_FORM_addr:
+ case DW_FORM_addrx:
+ case DW_FORM_addrx1:
+ case DW_FORM_addrx2:
+ case DW_FORM_addrx3:
+ case DW_FORM_addrx4:
if (!cbargs->silent)
{
Dwarf_Addr addr;