mirror of
https://github.com/NixOS/patchelf.git
synced 2025-10-24 03:12:49 +08:00
Don't use dynamic page size
This mostly reverts 08050dd5e3 (#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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user