This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] PT_GNU_MBIND section mapping


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7137a1ed0ad9afdd57e6ef44abbfaeaeb44dd17e

commit 7137a1ed0ad9afdd57e6ef44abbfaeaeb44dd17e
Author: Alan Modra <amodra@gmail.com>
Date:   Wed Jul 24 15:03:49 2019 +0930

    PT_GNU_MBIND section mapping
    
    	* elf/internal.h (ELF_SECTION_IN_SEGMENT_1): Exclude non-alloc
    	sections in GNU_MBIND segments.

Diff:
---
 include/ChangeLog      | 5 +++++
 include/elf/internal.h | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/include/ChangeLog b/include/ChangeLog
index 4c841e3..ce38864 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2019-07-24  Alan Modra  <amodra@gmail.com>
+
+	* elf/internal.h (ELF_SECTION_IN_SEGMENT_1): Exclude non-alloc
+	sections in GNU_MBIND segments.
+
 2019-07-23  Omar Majid  <omajid@redhat.com>
 
 	* coff/i386.h (IMAGE_FILE_MACHINE_NATIVE_APPLE_OVERRIDE): Define.
diff --git a/include/elf/internal.h b/include/elf/internal.h
index e29fc40..59e3ede 100644
--- a/include/elf/internal.h
+++ b/include/elf/internal.h
@@ -330,8 +330,10 @@ struct elf_segment_map
 	&& ((segment)->p_type == PT_LOAD				\
 	    || (segment)->p_type == PT_DYNAMIC				\
 	    || (segment)->p_type == PT_GNU_EH_FRAME			\
+	    || (segment)->p_type == PT_GNU_STACK			\
 	    || (segment)->p_type == PT_GNU_RELRO			\
-	    || (segment)->p_type == PT_GNU_STACK))			\
+	    || ((segment)->p_type >= PT_GNU_MBIND_LO			\
+		&& (segment)->p_type <= PT_GNU_MBIND_HI)))		\
    /* Any section besides one of type SHT_NOBITS must have file		\
       offsets within the segment.  */					\
    && ((sec_hdr)->sh_type == SHT_NOBITS					\


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]