diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf.c | 19 |
2 files changed, 24 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 2ad7803..b614bd4 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -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 @@ -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); } } |