diff options
Diffstat (limited to 'src/patchelf.cc')
-rw-r--r-- | src/patchelf.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/patchelf.cc b/src/patchelf.cc index e4bb084..0831f62 100644 --- a/src/patchelf.cc +++ b/src/patchelf.cc @@ -29,7 +29,7 @@ static bool debugMode = false; static bool forceRPath = false; static string fileName; - +static int pageSize = PAGESIZE; off_t fileSize, maxSize; unsigned char * contents = 0; @@ -40,7 +40,7 @@ unsigned char * contents = 0; static unsigned int getPageSize(){ - return PAGESIZE; + return pageSize; } @@ -1472,6 +1472,7 @@ void showHelp(const string & progName) { fprintf(stderr, "syntax: %s\n\ [--set-interpreter FILENAME]\n\ + [--page-size SIZE]\n\ [--print-interpreter]\n\ [--print-soname]\t\tPrints 'DT_SONAME' entry of .dynamic section. Raises an error if DT_SONAME doesn't exist\n\ [--set-soname SONAME]\t\tSets 'DT_SONAME' entry to SONAME.\n\ @@ -1507,6 +1508,11 @@ int main(int argc, char * * argv) if (++i == argc) error("missing argument"); newInterpreter = argv[i]; } + else if (arg == "--page-size") { + if (++i == argc) error("missing argument"); + pageSize = atoi(argv[i]); + if (pageSize <= 0) error("invalid argument to --page-size"); + } else if (arg == "--print-interpreter") { printInterpreter = true; } |