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.

65 lines
2.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../e3/e3-gnu-stack.patch
  5. # Copyright (C) 2013 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. mark the stack as non-executable and disable tiny/crippled elf on 32
  17. bit linux so that stack can be marked as non-executable on it too
  18. http://www.gentoo.org/proj/en/hardened/gnu-stack.xml
  19. this change will slightly increase the size of the e3 binary.
  20. On 32bit x86 the size in bytes reported by stat(1) is:
  21. - with tiny/crippled elf header: 13283
  22. - without tiny/crippled elf header: 16880
  23. patch origin: http://pkgs.fedoraproject.org/cgit/e3.git/plain/e3-gnu-stack.patch
  24. diff -u e3-2.8.orig/e3.asm e3-2.8/e3.asm
  25. --- e3-2.8.orig/e3.asm 2010-05-09 12:16:47.000000000 -0400
  26. +++ e3-2.8/e3.asm 2013-02-22 14:24:46.884384131 -0500
  27. @@ -6543,3 +6543,13 @@
  28. %ifdef CRIPLED_ELF
  29. bsssize equ $-bssstart
  30. %endif
  31. +
  32. +%ifidn __OUTPUT_FORMAT__,elf
  33. +section .note.GNU-stack noalloc noexec nowrite progbits
  34. +%endif
  35. +%ifidn __OUTPUT_FORMAT__,elf32
  36. +section .note.GNU-stack noalloc noexec nowrite progbits
  37. +%endif
  38. +%ifidn __OUTPUT_FORMAT__,elf64
  39. +section .note.GNU-stack noalloc noexec nowrite progbits
  40. +%endif
  41. Only in e3-2.8: e3.asm~
  42. diff -u e3-2.8.orig/Makefile e3-2.8/Makefile
  43. --- e3-2.8.orig/Makefile 2010-05-27 14:58:59.000000000 -0400
  44. +++ e3-2.8/Makefile 2013-02-22 15:38:57.729605772 -0500
  45. @@ -38,15 +38,10 @@
  46. #---------------- 32 bit LINUX (and perhaps BSD) --
  47. 32: $(ASOURCES) Makefile
  48. -ifeq ($(OS),LINUX)
  49. - nasm -O2 -f bin -l e3.lst -o e3 e3.asm -DCRIPLED_ELF=1 -D$(OS) -D$(EXMODE)
  50. - chmod +x e3
  51. -else
  52. echo $(ASVER)
  53. nasm -O2 $(AFLAGS) -o e3.o e3.asm -l e3.lst -D$(OS) -D$(EXMODE)
  54. ld -s -o e3 e3.o
  55. strip --remove-section .comment e3
  56. -endif
  57. ln -sf e3 e3ws
  58. ln -sf e3 e3em
  59. ln -sf e3 e3pi