/[gentoo-x86]/dev-lang/go/files/go-1.0.2-hardened.patch
Gentoo

Contents of /dev-lang/go/files/go-1.0.2-hardened.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Mon Jul 30 18:49:38 2012 UTC (9 months, 2 weeks ago) by williamh
Branch: MAIN
Add go version 1.0.2 to the tree and sync live ebuild.
This also includes a patch from upstream to add the pax flags header to
binaries.

(Portage version: 2.2.0_alpha120/cvs/Linux i686)

1 williamh 1.1 Index: src/cmd/6l/asm.c
2     ===================================================================
3     --- a/src/cmd/6l/asm.c
4     +++ b/src/cmd/6l/asm.c
5     @@ -1082,6 +1082,11 @@
6     ph->type = PT_GNU_STACK;
7     ph->flags = PF_W+PF_R;
8     ph->align = 8;
9     +
10     + ph = newElfPhdr();
11     + ph->type = PT_PAX_FLAGS;
12     + ph->flags = 0x2a00; // mprotect, randexec, emutramp disabled
13     + ph->align = 8;
14    
15     sh = newElfShstrtab(elfstr[ElfStrShstrtab]);
16     sh->type = SHT_STRTAB;
17     Index: src/cmd/8l/asm.c
18     ===================================================================
19     --- a/src/cmd/8l/asm.c
20     +++ b/src/cmd/8l/asm.c
21     @@ -1127,6 +1127,11 @@
22     ph->flags = PF_W+PF_R;
23     ph->align = 4;
24    
25     + ph = newElfPhdr();
26     + ph->type = PT_PAX_FLAGS;
27     + ph->flags = 0x2a00; // mprotect, randexec, emutramp disabled
28     + ph->align = 8;
29     +
30     sh = newElfShstrtab(elfstr[ElfStrShstrtab]);
31     sh->type = SHT_STRTAB;
32     sh->addralign = 1;
33     Index: src/cmd/ld/elf.h
34     ===================================================================
35     --- a/src/cmd/ld/elf.h
36     +++ b/src/cmd/ld/elf.h
37     @@ -251,6 +251,7 @@
38     #define PT_LOPROC 0x70000000 /* First processor-specific type. */
39     #define PT_HIPROC 0x7fffffff /* Last processor-specific type. */
40     #define PT_GNU_STACK 0x6474e551
41     +#define PT_PAX_FLAGS 0x65041580
42    
43     /* Values for p_flags. */
44     #define PF_X 0x1 /* Executable. */

  ViewVC Help
Powered by ViewVC 1.1.13