diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d03929a..6c89655 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2021-04-14 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/27708 + * elf.c (assign_file_positions_for_non_load_sections): Set + p_memsz to p_filesz for the loadable PT_NOTE segment. + 2021-04-14 Frederic Cambus <fred@statdns.com> * elf.c (elfcore_grok_netbsd_note): Remove unneeded #ifdef @@ -6300,6 +6300,11 @@ assign_file_positions_for_non_load_sections (bfd *abfd, { p->p_filesz = (sect->filepos - m->sections[0]->filepos + hdr->sh_size); + /* NB: p_memsz of the loadable PT_NOTE segment + should be the same as p_filesz. */ + if (p->p_type == PT_NOTE + && (hdr->sh_flags & SHF_ALLOC) != 0) + p->p_memsz = p->p_filesz; break; } } |