Remove old and ugly printing functions
[centaur.git] / src / options.c
index 1a191a513e5c4cd2aec3560fd11a21e5e8e8591d..198f01baa5bd6cbfd8037179d4f21caa1345b38b 100644 (file)
@@ -14,11 +14,11 @@ static void printUsage(char *progname)
           "  -h, --help                     Print this help message\n"
           "  -o, --output                   Where to write the modified ELF file to\n"
           "\n"
-          "ELF dump:\n"
-          "      --print-header             Print ELF header\n"
-          "      --print-segments           Print program headers\n"
-          "      --print-sections           Print sections\n"
-          "\n"
+//          "ELF dump:\n"
+//          "      --print-header             Print ELF header\n"
+//          "      --print-segments           Print program headers\n"
+//          "      --print-sections           Print sections\n"
+//          "\n"
           "Space insertion:\n"
           "    off: File offset, not within any structure (headers or sections).\n"
           "    sz:  A multiple of the maximum alignment of all PHDRs.\n"
@@ -28,6 +28,9 @@ static void printUsage(char *progname)
           "                                 mapping everything before it to lower mem addresses.\n"
           "      --insert-after  off,sz     Insert spacing at given offset,\n"
           "                                 mapping everything after it to higher mem addresses.\n"
+          "\n"
+          "High-level insertion:\n"
+          "      --reladd        obj.o      Automatically insert object file contents\n"
           "\n");
 }
 
@@ -49,6 +52,7 @@ void parseOptions(CLIOpts *opts, int argc, char **argv)
     {"insert-before", 1, 0, 10004},
     {"insert-after", 1, 0, 10005},
     {"expand-nobits", 1, 0, 10006},
+    {"reladd", 1, 0, 10007},
     {NULL, 0, NULL, 0}
   };
 
@@ -96,6 +100,9 @@ void parseOptions(CLIOpts *opts, int argc, char **argv)
           goto USAGE;
         }
         break;
+      case 10007:
+        opts->fnReladd = optarg;
+        break;
       case '?':
       default:
         goto USAGE;