aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorLuis Machado <luis.machado@arm.com>2022-06-28 12:57:34 +0100
committerLuis Machado <luis.machado@arm.com>2022-07-19 15:24:27 +0100
commitd0ff5ca959df91dcef16ec57154ff199fad5a4e4 (patch)
tree2c4c2a74b17daebac60d1e69725c65a854beb632 /binutils
parent3c539d41b48e5a70cc22b0151ee79b8bd752341d (diff)
downloadfsf-binutils-gdb-d0ff5ca959df91dcef16ec57154ff199fad5a4e4.zip
fsf-binutils-gdb-d0ff5ca959df91dcef16ec57154ff199fad5a4e4.tar.gz
fsf-binutils-gdb-d0ff5ca959df91dcef16ec57154ff199fad5a4e4.tar.bz2
[AArch64] Support AArch64 MTE memory tag dumps in core files
The Linux kernel can dump memory tag segments to a core file, one segment per mapped range. The format and documentation can be found in the Linux kernel tree [1]. The following patch adjusts bfd and binutils so they can handle this new segment type and display it accordingly. It also adds code required so GDB can properly read/dump core file data containing memory tags. Upon reading, each segment that contains memory tags gets mapped to a section named "memtag". These sections will be used by GDB to lookup the tag data. There can be multiple such sections with the same name, and they are not numbered to simplify GDB's handling and lookup. There is another patch for GDB that enables both reading and dumping of memory tag segments. Tested on aarch64-linux Ubuntu 20.04. [1] Documentation/arm64/memory-tagging-extension.rst (Core Dump Support)
Diffstat (limited to 'binutils')
-rw-r--r--binutils/readelf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 0f5977b..6b7692d 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -4493,6 +4493,7 @@ get_aarch64_segment_type (unsigned long type)
switch (type)
{
case PT_AARCH64_ARCHEXT: return "AARCH64_ARCHEXT";
+ case PT_AARCH64_MEMTAG_MTE: return "AARCH64_MEMTAG_MTE";
default: return NULL;
}
}