Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* sysdeps/i386/dl-machine.h (RTLD_START): Set __libc_stack_end before
	calling _dl_start, using GOTOFF access.

	* configure.in (libc_cv_z_execstack): New check.
	* configure: Regenerated.
	* config.make.in (have-z-execstack): New variable set by it.
	* elf/tst-execstack.c: New file.
	* elf/tst-execstack-mod.c: New file.
	* elf/tst-execstack-needed.c: New file.
	* elf/Makefile (tests-execstack-yes, modules-execstack-yes): New
	variables.
	(tests, modules-names): Conditionally include them.
	(distribute): Add tst-execstack-mod.c here.
	($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
	(LDFLAGS-tst-execstack, LDFLAGS-tst-execstack-mod): New variables.
	($(objpfx)tst-execstack-needed): New target.
	(LDFLAGS-tst-execstack-needed): New variable.

	* sysdeps/generic/ldsodefs.h (struct rtld_global): Add _dl_stack_flags
	and _dl_make_stack_executable_hook.  Declare _dl_make_stack_executable.
	* elf/rtld.c (_rtld_global): Add initializer for _dl_stack_flags.
	(dl_main): Reset _dl_stack_flags according to PT_GNU_STACK phdr.
	Initialize _dl_make_stack_executable_hook.
	* elf/dl-support.c: Define those new variables.
	(_dl_non_dynamic_init): Scan phdrs for PT_GNU_STACK.
	(_dl_phdr): Fix type.
	* elf/dl-load.c (_dl_map_object_from_fd): Grok PT_GNU_STACK phdr and
	enable execute permission for the stack if necessary.
	* sysdeps/generic/dl-execstack.c: New file.
	* elf/Makefile (dl-routines): Add it.
	* elf/Versions (ld: GLIBC_PRIVATE): Add _dl_make_stack_executable.
	* sysdeps/unix/sysv/linux/dl-execstack.c: New file.
  • Loading branch information
Roland McGrath committed Sep 23, 2003
1 parent ecdeaac commit 2abf9ff
Show file tree
Hide file tree
Showing 9 changed files with 683 additions and 146 deletions.
35 changes: 35 additions & 0 deletions ChangeLog
@@ -1,3 +1,38 @@
2003-09-23 Roland McGrath <roland@redhat.com>

* sysdeps/i386/dl-machine.h (RTLD_START): Set __libc_stack_end before
calling _dl_start, using GOTOFF access.

* configure.in (libc_cv_z_execstack): New check.
* configure: Regenerated.
* config.make.in (have-z-execstack): New variable set by it.
* elf/tst-execstack.c: New file.
* elf/tst-execstack-mod.c: New file.
* elf/tst-execstack-needed.c: New file.
* elf/Makefile (tests-execstack-yes, modules-execstack-yes): New
variables.
(tests, modules-names): Conditionally include them.
(distribute): Add tst-execstack-mod.c here.
($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
(LDFLAGS-tst-execstack, LDFLAGS-tst-execstack-mod): New variables.
($(objpfx)tst-execstack-needed): New target.
(LDFLAGS-tst-execstack-needed): New variable.

* sysdeps/generic/ldsodefs.h (struct rtld_global): Add _dl_stack_flags
and _dl_make_stack_executable_hook. Declare _dl_make_stack_executable.
* elf/rtld.c (_rtld_global): Add initializer for _dl_stack_flags.
(dl_main): Reset _dl_stack_flags according to PT_GNU_STACK phdr.
Initialize _dl_make_stack_executable_hook.
* elf/dl-support.c: Define those new variables.
(_dl_non_dynamic_init): Scan phdrs for PT_GNU_STACK.
(_dl_phdr): Fix type.
* elf/dl-load.c (_dl_map_object_from_fd): Grok PT_GNU_STACK phdr and
enable execute permission for the stack if necessary.
* sysdeps/generic/dl-execstack.c: New file.
* elf/Makefile (dl-routines): Add it.
* elf/Versions (ld: GLIBC_PRIVATE): Add _dl_make_stack_executable.
* sysdeps/unix/sysv/linux/dl-execstack.c: New file.

2003-09-23 Ulrich Drepper <drepper@redhat.com>

* sysdeps/posix/sprofil.c (pc_to_index): Remove inline marker.
Expand Down
1 change: 1 addition & 0 deletions config.make.in
Expand Up @@ -42,6 +42,7 @@ have-z-nodelete = @libc_cv_z_nodelete@
have-z-nodlopen = @libc_cv_z_nodlopen@
have-z-initfirst = @libc_cv_z_initfirst@
have-z-combreloc = @libc_cv_z_combreloc@
have-z-execstack = @libc_cv_z_execstack@
have-initfini = @libc_cv_have_initfini@
have-Bgroup = @libc_cv_Bgroup@
need-nopic-initfini = @nopic_initfini@
Expand Down

0 comments on commit 2abf9ff

Please sign in to comment.