[AArch64] MTE corefile support
bfd * elf.c (elfcore_make_memtag_note_section): New function. (elfcore_grok_note): Handle NT_MEMTAG note types. binutils* readelf.c (get_note_type): Handle NT_MEMTAG note types. include * elf/common.h (NT_MEMTAG): New constant. (NT_MEMTAG_TYPE_AARCH_MTE): New constant.
This commit is contained in:
parent
75b969ccb1
commit
894982bfcc
@ -1,3 +1,8 @@
|
||||
2021-05-21 Luis Machado <luis.machado@linaro.org>
|
||||
|
||||
* elf.c (elfcore_make_memtag_note_section): New function.
|
||||
(elfcore_grok_note): Handle NT_MEMTAG note types.
|
||||
|
||||
2021-05-20 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||
|
||||
* section.c (bfd_get_section_by_name): Return NULL if name is
|
||||
|
19
bfd/elf.c
19
bfd/elf.c
@ -9597,6 +9597,23 @@ elfcore_make_auxv_note_section (bfd *abfd, Elf_Internal_Note *note,
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
elfcore_make_memtag_note_section (bfd *abfd, Elf_Internal_Note *note,
|
||||
size_t offs)
|
||||
{
|
||||
asection *sect = bfd_make_section_anyway_with_flags (abfd, ".memtag",
|
||||
SEC_HAS_CONTENTS);
|
||||
|
||||
if (sect == NULL)
|
||||
return false;
|
||||
|
||||
sect->size = note->descsz - offs;
|
||||
sect->filepos = note->descpos + offs;
|
||||
sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* prstatus_t exists on:
|
||||
solaris 2.5+
|
||||
linux 2.[01] + glibc
|
||||
@ -10657,6 +10674,8 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
|
||||
return elfcore_make_note_pseudosection (abfd, ".note.linuxcore.siginfo",
|
||||
note);
|
||||
|
||||
case NT_MEMTAG:
|
||||
return elfcore_make_memtag_note_section (abfd, note, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
2021-05-21 Luis Machado <luis.machado@linaro.org>
|
||||
|
||||
* readelf.c (get_note_type): Handle NT_MEMTAG note types.
|
||||
|
||||
2021-05-19 Eli Schwartz <eschwartz@archlinux.org>
|
||||
|
||||
* dwarf.c (ENABLE_CHECKING): Define to 0 if not previously set.
|
||||
|
@ -18696,6 +18696,8 @@ get_note_type (Filedata * filedata, unsigned e_type)
|
||||
return _("NT_SIGINFO (siginfo_t data)");
|
||||
case NT_FILE:
|
||||
return _("NT_FILE (mapped files)");
|
||||
case NT_MEMTAG:
|
||||
return _("NT_MEMTAG (memory tags)");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2021-05-21 Luis Machado <luis.machado@linaro.org>
|
||||
|
||||
* elf/common.h (NT_MEMTAG): New constant.
|
||||
(NT_MEMTAG_TYPE_AARCH_MTE): New constant.
|
||||
|
||||
2021-05-07 Clément Chigot <clement.chigot@atos.net>
|
||||
|
||||
* coff/internal.h (C_DWARF): New define.
|
||||
|
@ -685,6 +685,12 @@
|
||||
/* The range 0xff000000 to 0xffffffff is set aside for notes that don't
|
||||
originate from any particular operating system. */
|
||||
#define NT_GDB_TDESC 0xff000000 /* Contains copy of GDB's target description XML. */
|
||||
#define NT_MEMTAG 0xff000001 /* Contains a copy of the memory tags. */
|
||||
|
||||
/* NT_MEMTAG record types. */
|
||||
|
||||
/* ARM-specific NT_MEMTAG types. */
|
||||
#define NT_MEMTAG_TYPE_AARCH_MTE 0x400 /* MTE memory tags for AArch64. */
|
||||
|
||||
/* Note segments for core files on dir-style procfs systems. */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user