File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ of executables and change the RPATH of executables and libraries.
2222
2323The single option given operates on a given FILE, editing in place.
2424
25+ .IP " --page-size SIZE"
26+ Uses the given page size instead of the default.
27+
2528.IP " --set-interpreter INTERPRETER"
2629Change the dynamic loader ("ELF interpreter") of executable given to
2730INTERPRETER.
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ static bool debugMode = false;
2929static bool forceRPath = false ;
3030
3131static string fileName;
32-
32+ static int pageSize = PAGESIZE;
3333
3434off_t fileSize, maxSize;
3535unsigned char * contents = 0 ;
@@ -40,7 +40,7 @@ unsigned char * contents = 0;
4040
4141
4242static unsigned int getPageSize (){
43- return PAGESIZE ;
43+ return pageSize ;
4444}
4545
4646
@@ -1472,6 +1472,7 @@ void showHelp(const string & progName)
14721472{
14731473 fprintf (stderr, " syntax: %s\n \
14741474 [--set-interpreter FILENAME]\n \
1475+ [--page-size SIZE]\n \
14751476 [--print-interpreter]\n \
14761477 [--print-soname]\t\t Prints 'DT_SONAME' entry of .dynamic section. Raises an error if DT_SONAME doesn't exist\n \
14771478 [--set-soname SONAME]\t\t Sets 'DT_SONAME' entry to SONAME.\n \
@@ -1507,6 +1508,11 @@ int main(int argc, char * * argv)
15071508 if (++i == argc) error (" missing argument" );
15081509 newInterpreter = argv[i];
15091510 }
1511+ else if (arg == " --page-size" ) {
1512+ if (++i == argc) error (" missing argument" );
1513+ pageSize = atoi (argv[i]);
1514+ if (pageSize <= 0 ) error (" invalid argument to --page-size" );
1515+ }
15101516 else if (arg == " --print-interpreter" ) {
15111517 printInterpreter = true ;
15121518 }
You can’t perform that action at this time.
0 commit comments