aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorFaraz Shahbazker <faraz.shahbazker@imgtec.com>2016-02-23 12:58:03 +0000
committerNick Clifton <nickc@redhat.com>2016-02-23 12:58:03 +0000
commit17733f5be961baa7a47fdf1471aa6948372293d6 (patch)
tree961d729fa304e70c83c1a86b3487b57e0a8b9f5c /bfd/elfxx-mips.c
parent47993b4af18c6ef1cad300f6393bf896d3cb5e5c (diff)
downloadgdb-17733f5be961baa7a47fdf1471aa6948372293d6.zip
gdb-17733f5be961baa7a47fdf1471aa6948372293d6.tar.gz
gdb-17733f5be961baa7a47fdf1471aa6948372293d6.tar.bz2
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.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c3
1 files changed, 3 insertions, 0 deletions
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