summaryrefslogtreecommitdiffstats
path: root/src/patchelf.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-01-08 15:12:01 (GMT)
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-01-08 15:12:01 (GMT)
commitdd299dc2a76662551eb96fede37ba370367c9ba8 (patch)
tree32e6b1fa491a287e40127d0478cbf05d6641ee7c /src/patchelf.cc
parent1d0ab307db61c64ab50e9fb582ab236d2b09f221 (diff)
downloadpatchelf-dd299dc2a76662551eb96fede37ba370367c9ba8.zip
patchelf-dd299dc2a76662551eb96fede37ba370367c9ba8.tar.gz
patchelf-dd299dc2a76662551eb96fede37ba370367c9ba8.tar.bz2
Don't use dynamic page size
This mostly reverts 08050dd5e3701b29e5628e1ec7d37c1cd6529c57 (#54) because the page size of the host is not necessarily the same as the page size of the binary. For a proper fix, we'll need some way to determine the page size of the binary, but ELF doesn't readily provide this information. Fixes #69.
Diffstat (limited to 'src/patchelf.cc')
-rw-r--r--src/patchelf.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/patchelf.cc b/src/patchelf.cc
index 4d299e9..ddde0c1 100644
--- a/src/patchelf.cc
+++ b/src/patchelf.cc
@@ -40,9 +40,10 @@ unsigned char * contents = 0;
static unsigned int getPageSize(){
-#if (defined HAVE_SYSCONF)
- // if present, use sysconf to get kernel page size
- return sysconf(_SC_PAGESIZE);
+#ifdef MIPSEL
+ /* The lemote fuloong 2f kernel defconfig sets a page size of
+ 16KB. */
+ return 4096 * 4;
#else
return 4096;
#endif