summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2003-06-03 22:27:23 +0000
committerJakub Jelinek <jakub@redhat.com>2003-06-03 22:27:23 +0000
commit9459c9b0ae0b62e9505bfa2060432210abdfedfd (patch)
treeec1f9814b46521ad32e56108175a2817b4607370 /include
parent4fef0ea3f6e3bf03ac410a8afe485af5a0f859b8 (diff)
downloadgdb-9459c9b0ae0b62e9505bfa2060432210abdfedfd.tar.gz
binutils/
* readelf.c (get_segment_type): Handle PT_GNU_STACK. bfd/ * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK. (bfd_section_from_phdr): Likewise. (map_sections_to_segments): Create PT_GNU_STACK segment header. (get_program_header_size): Count with PT_GNU_STACK. * elf-bfd.h (struct elf_obj_tdata): Add stack_flags. * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags. include/ * bfdlink.h (struct bfd_link_info): Add execstack and noexecstack. * elf/common.h (PT_GNU_STACK): Define. ld/ * ldgram.y (phdr_type): Grok PT_GNU_STACK. * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add -z execstack and -z noexecstack. (gld${EMULATION_NAME}_list_options): Likewise. * scripttempl/elf.sc: If not -r, discard .note.GNU-stack section.
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog5
-rw-r--r--include/bfdlink.h8
-rw-r--r--include/elf/common.h1
3 files changed, 14 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 96f1777729e..18d0b3509e7 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2003-05-23 Jakub Jelinek <jakub@redhat.com>
+
+ * bfdlink.h (struct bfd_link_info): Add execstack and noexecstack.
+ * elf/common.h (PT_GNU_STACK): Define.
+
2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
* bfdlink.h (LD_DEFINITION_IN_DISCARDED_SECTION): New.
diff --git a/include/bfdlink.h b/include/bfdlink.h
index d68fe113f1f..4636025b8b9 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -297,6 +297,14 @@ struct bfd_link_info
/* TRUE if generating an executable, position independent or not. */
unsigned int executable : 1;
+ /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W|PF_X
+ flags. */
+ unsigned int execstack: 1;
+
+ /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W
+ flags. */
+ unsigned int noexecstack: 1;
+
/* Which symbols to strip. */
enum bfd_link_strip strip;
diff --git a/include/elf/common.h b/include/elf/common.h
index f342d573710..3635bbb6419 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -288,6 +288,7 @@
#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
+#define PT_GNU_STACK (PT_LOOS + 0x474e551)
/* Program segment permissions, in program header p_flags field. */