aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elf.c8
2 files changed, 4 insertions, 8 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 411c190..adbf6f3 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2020-07-22 Kevin Buettner <kevinb@redhat.com>
+
+ * elf.c (_bfd_elf_make_section_from_phdr): Remove hack for GDB.
+
2020-07-22 Max Filippov <jcmvbkbc@gmail.com>
PR 26246
diff --git a/bfd/elf.c b/bfd/elf.c
index 9ca42e1..991a71c 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -3026,14 +3026,6 @@ _bfd_elf_make_section_from_phdr (bfd *abfd,
newsect->alignment_power = bfd_log2 (align);
if (hdr->p_type == PT_LOAD)
{
- /* Hack for gdb. Segments that have not been modified do
- not have their contents written to a core file, on the
- assumption that a debugger can find the contents in the
- executable. We flag this case by setting the fake
- section size to zero. Note that "real" bss sections will
- always have their contents dumped to the core file. */
- if (bfd_get_format (abfd) == bfd_core)
- newsect->size = 0;
newsect->flags |= SEC_ALLOC;
if (hdr->p_flags & PF_X)
newsect->flags |= SEC_CODE;