scripts/addToolsVersion: properly handle .in vs. .in.2
While most components have their version in the .in file, some
have it in the .in.2 (eg. elf2flt).
Currently, to handle this case, we indiscriminately munge both files,
but this is wrong: in the elf2flt case, if we add a binutils version,
we do not want it to be added to elf2flt, and conversely.
So, for each tool, we need to explicitly know what file to munge.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
1 With latest versions of glibc, a lot of apps failed on a PaX enabled
3 cannot enable executable stack as shared object requires: Permission denied
5 This is due to PaX 'exec-protecting' the stack, and ld.so then trying
6 to make the stack executable due to some libraries not containing the
7 PT_GNU_STACK section. Bug #32960. <azarah@gentoo.org> (12 Nov 2003).
9 Patch also NPTL. Bug #116086. <kevquinn@gentoo.org> (20 Dec 2005).
11 diff -durN glibc-2.12.1.orig/nptl/allocatestack.c glibc-2.12.1/nptl/allocatestack.c
12 --- glibc-2.12.1.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100
13 +++ glibc-2.12.1/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100
15 # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
17 if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0)
19 + if (errno != EACCES) /* PAX is enabled */
24 diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.12.1/sysdeps/unix/sysv/linux/dl-execstack.c
25 --- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100
26 +++ glibc-2.12.1/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100
32 + if (errno == EACCES) /* PAX is enabled */
43 - if (errno != ENOMEM) /* Unexpected failure mode. */
44 + if (errno == EACCES) /* PAX is enabled */
49 + else if (errno != ENOMEM) /* Unexpected failure mode. */
57 - if (errno != ENOMEM) /* Unexpected failure mode. */
58 + if (errno == EACCES) /* PAX is enabled */
63 + else if (errno != ENOMEM) /* Unexpected failure mode. */