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] Increment the ABIVERSION to 5 for MIPS objects with non-executable stacks.


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

commit 17733f5be961baa7a47fdf1471aa6948372293d6
Author: Faraz Shahbazker <faraz.shahbazker@imgtec.com>
Date:   Tue Feb 23 12:58:03 2016 +0000

    Increment the ABIVERSION to 5 for MIPS objects with non-executable stacks.
    
    	* bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
    	ABIVERSION for non-executable stack.

Diff:
---
 bfd/ChangeLog    | 5 +++++
 bfd/elfxx-mips.c | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5ec3b93..d7bc5fa 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2016-02-23  Faraz Shahbazker  <faraz.shahbazker@imgtec.com>
+
+	* bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
+	ABIVERSION for non-executable stack.
+
 2016-02-23  Rich Felker  <bugdal@aerifal.cx>
 
 	PR target/19516
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index fa14e8d..e4996fa 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -16140,6 +16140,9 @@ _bfd_mips_post_process_headers (bfd *abfd, struct bfd_link_info *link_info)
   if (mips_elf_tdata (abfd)->abiflags.fp_abi == Val_GNU_MIPS_ABI_FP_64
       || mips_elf_tdata (abfd)->abiflags.fp_abi == Val_GNU_MIPS_ABI_FP_64A)
     i_ehdrp->e_ident[EI_ABIVERSION] = 3;
+
+  if (elf_stack_flags (abfd) && !(elf_stack_flags (abfd) & PF_X))
+    i_ehdrp->e_ident[EI_ABIVERSION] = 5;
 }
 
 int


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