aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-07-27 17:57:19 -0400
committerAnthony G. Basile <blueness@gentoo.org>2012-07-27 18:32:43 -0400
commit876968cff10459f16c5f439c73faa42bc1175c60 (patch)
treed3dd5ff12d114a436ae26582846320503ace9105
parenttests/gnustack: switch from yasm to gcc for assembler (diff)
downloadelfix-876968cff10459f16c5f439c73faa42bc1175c60.tar.gz
elfix-876968cff10459f16c5f439c73faa42bc1175c60.tar.bz2
elfix-876968cff10459f16c5f439c73faa42bc1175c60.zip
Revert "src/{fix-gnustack.c,paxctl-ng.c}: ELF_C_RDWR_MMAP -> ELF_C_RDWR for uclibc compat"
This reverts commit 02640d9d23cc4736e642600430b13406c33dba9e. Using libelf instead of elfutils to gelf_update_phdr() fails. Revert for now until we figure out what's going on. (cherry picked from commit b3e9ab5db62e344bfe72b78c6ab7fcfebf6d9592)
-rw-r--r--src/fix-gnustack.c2
-rw-r--r--src/paxctl-ng.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/fix-gnustack.c b/src/fix-gnustack.c
index 03da236..15e23e0 100644
--- a/src/fix-gnustack.c
+++ b/src/fix-gnustack.c
@@ -99,7 +99,7 @@ main( int argc, char *argv[])
{
if((fd = open(f_name, O_RDWR)) < 0)
error(EXIT_FAILURE, 0, "open() fail.");
- if((elf = elf_begin(fd, ELF_C_RDWR, NULL)) == NULL)
+ if((elf = elf_begin(fd, ELF_C_RDWR_MMAP, NULL)) == NULL)
error(EXIT_FAILURE, 0, "elf_begin() fail: %s", elf_errmsg(elf_errno()));
}
else
diff --git a/src/paxctl-ng.c b/src/paxctl-ng.c
index 4b7e6fb..025ea24 100644
--- a/src/paxctl-ng.c
+++ b/src/paxctl-ng.c
@@ -216,7 +216,7 @@ get_pt_flags(int fd, int verbose)
return pt_flags;
}
- if((elf = elf_begin(fd, ELF_C_READ, NULL)) == NULL)
+ if((elf = elf_begin(fd, ELF_C_READ_MMAP, NULL)) == NULL)
{
if(verbose)
printf("\tELF ERROR: elf_begin() fail: %s\n", elf_errmsg(elf_errno()));
@@ -460,7 +460,7 @@ set_pt_flags(int fd, uint16_t pt_flags, int verbose)
return;
}
- if((elf = elf_begin(fd, ELF_C_RDWR, NULL)) == NULL)
+ if((elf = elf_begin(fd, ELF_C_RDWR_MMAP, NULL)) == NULL)
{
if(verbose)
printf("\tELF ERROR: elf_begin() fail: %s\n", elf_errmsg(elf_errno()));