diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2003-01-30 21:06:48 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2003-01-30 21:06:48 +0000 |
commit | 9b47077e91abff859fb1253814138b68d1e5b817 (patch) | |
tree | 5c5918cc8db29644d0da4b2c91063d79df790e3b /gnu/usr.bin/binutils/ld/emulparams | |
parent | 40fa295c7d4b8f2c25a804fbe379c2b34aa6e180 (diff) |
ELF security enhancement: put .rodata into it's own load section instead
of putting it with the text. This removes the execute permission
from readonly data. This constrains the executable region to portions
of the executable which need to be executable. Note: not all processors
or mmus are capable of -X protection at the page level, but should
handle ELF images which specify specific RWX protections on each section.
Diffstat (limited to 'gnu/usr.bin/binutils/ld/emulparams')
5 files changed, 5 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32_sparc.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32_sparc.sh index 68c9e4fb39f..fc23bb59c5e 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/elf32_sparc.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/elf32_sparc.sh @@ -8,6 +8,7 @@ ARCH=sparc MACHINE= TEMPLATE_NAME=elf32 DATA_PLT= +PAD_RO= PAD_PLT= PAD_GOT= GENERATE_SHLIB_SCRIPT=yes diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf32ppc.sh b/gnu/usr.bin/binutils/ld/emulparams/elf32ppc.sh index 7c8b5c95caa..0fbbf68c7ec 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/elf32ppc.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/elf32ppc.sh @@ -9,6 +9,7 @@ MAXPAGESIZE=0x10000 ARCH=powerpc MACHINE= BSS_PLT= +PAD_RO= PAD_GOT= PAD_PLT= EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);' diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf64_sparc.sh b/gnu/usr.bin/binutils/ld/emulparams/elf64_sparc.sh index 00790d59201..091824d5cf5 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/elf64_sparc.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/elf64_sparc.sh @@ -6,6 +6,7 @@ MAXPAGESIZE=0x100000 ARCH="sparc:v9" MACHINE= DATA_PLT= +PAD_RO= PAD_GOT= PAD_PLT= GENERATE_SHLIB_SCRIPT=yes diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf64alpha.sh b/gnu/usr.bin/binutils/ld/emulparams/elf64alpha.sh index fa9fad04695..0abe219f84a 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/elf64alpha.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/elf64alpha.sh @@ -10,6 +10,7 @@ ARCH=alpha MACHINE= GENERATE_SHLIB_SCRIPT=yes DATA_PLT= +PAD_RO= PAD_GOT= PAD_PLT= NOP=0x47ff041f diff --git a/gnu/usr.bin/binutils/ld/emulparams/elf_i386.sh b/gnu/usr.bin/binutils/ld/emulparams/elf_i386.sh index 0defc2d866f..aca49bcbaf6 100644 --- a/gnu/usr.bin/binutils/ld/emulparams/elf_i386.sh +++ b/gnu/usr.bin/binutils/ld/emulparams/elf_i386.sh @@ -6,6 +6,7 @@ NONPAGED_TEXT_START_ADDR=0x08048000 ARCH=i386 MACHINE= NOP=0x9090 +PAD_RO= PAD_GOT= TEMPLATE_NAME=elf32 GENERATE_SHLIB_SCRIPT=yes |