OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
2.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../elfutils/elfutils-0.153-PaX-support.patch
  5. # Copyright (C) 2012 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Description: Add support for PaX ELF markings
  17. Origin: Gentoo
  18. This is a rediffed version of the original patch from Gentoo made
  19. by Kevin F. Quinn <kevquinn@gentoo.org>
  20. http://bugs.gentoo.org/115100
  21. http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/elfutils/files/elfutils-0.118-PaX-support.patch?revision=1.1
  22. diff -NurpP --minimal elfutils-0.153/libelf/elf.h elfutils-0.153-PaX/libelf/elf.h
  23. --- elfutils-0.153/libelf/elf.h 2011-07-19 22:42:41.000000000 +0200
  24. +++ elfutils-0.153-PaX/libelf/elf.h 2012-03-16 11:46:05.845672839 +0100
  25. @@ -580,6 +580,7 @@ typedef struct
  26. #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */
  27. #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
  28. #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
  29. +#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */
  30. #define PT_LOSUNW 0x6ffffffa
  31. #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
  32. #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
  33. diff -NurpP --minimal elfutils-0.153/src/elflint.c elfutils-0.153-PaX/src/elflint.c
  34. --- elfutils-0.153/src/elflint.c 2012-02-22 13:30:17.000000000 +0100
  35. +++ elfutils-0.153-PaX/src/elflint.c 2012-03-16 11:41:09.918213604 +0100
  36. @@ -4104,6 +4104,7 @@ only executables, shared objects, and co
  37. if (phdr->p_type >= PT_NUM && phdr->p_type != PT_GNU_EH_FRAME
  38. && phdr->p_type != PT_GNU_STACK && phdr->p_type != PT_GNU_RELRO
  39. + && phdr->p_type != PT_PAX_FLAGS
  40. /* Check for a known machine-specific type. */
  41. && ebl_segment_type_name (ebl, phdr->p_type, NULL, 0) == NULL)
  42. ERROR (gettext ("\