[llvm] Add adjustVMA option (PR #72870)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 21 00:16:17 PST 2023


================
@@ -205,28 +204,45 @@ defm prefix_symbols
       MetaVarName<"prefix">;
 
 defm prefix_alloc_sections
-    : Eq<"prefix-alloc-sections", "Add <prefix> to the start of every allocated section name">,
+    : Eq<"prefix-alloc-sections",
+         "Add <prefix> to the start of every allocated section name">,
       MetaVarName<"prefix">;
 
-defm set_start : Eq<"set-start", "Set the start address to <addr>. Overrides "
-                    "any previous --change-start or --adjust-start values">,
-                 MetaVarName<"addr">;
-defm change_start : Eq<"change-start", "Add <incr> to the start address. Can be "                        
-                       "specified multiple times, all values will be applied "
-                       "cumulatively">,
-                    MetaVarName<"incr">;
+defm set_start
+    : Eq<"set-start", "Set the start address to <addr>. Overrides "
+                      "any previous --change-start or --adjust-start values">,
+      MetaVarName<"addr">;
+defm change_start
+    : Eq<"change-start", "Add <incr> to the start address. Can be "
+                         "specified multiple times, all values will be applied "
+                         "cumulatively">,
+      MetaVarName<"incr">;
 def adjust_start : JoinedOrSeparate<["--"], "adjust-start">,
                    Alias<change_start>,
                    HelpText<"Alias for --change-start">;
 
 defm add_symbol
-    : Eq<"add-symbol", "Add new symbol <name> to .symtab. Accepted flags: "
-         "global, local, weak, default, hidden, protected, file, section, object, "
+    : Eq<"add-symbol",
+         "Add new symbol <name> to .symtab. Accepted flags: "
+         "global, local, weak, default, hidden, protected, file, section, "
+         "object, "
          "function, indirect-function. Accepted but ignored for "
          "compatibility: debug, constructor, warning, indirect, synthetic, "
          "unique-object, before">,
       MetaVarName<"name=[section:]value[,flags]">;
 
 defm update_section
-    : Eq<"update-section", "Replace the contents of section <name> with contents from a file <file>">,
+    : Eq<"update-section", "Replace the contents of section <name> with "
+                           "contents from a file <file>">,
       MetaVarName<"name=file">;
+
+defm adjust_section_vma
+    : Eq<"adjust-section-vma",
+         "Adjust VMA and LMA of section <section> by <value>"
+         ""
+         "">,
+      MetaVarName<".section{=|+|-}value">;
----------------
jh7370 wrote:

Please tidy up the formatting (you don't need these empty strings for example).

The GNU docs imply that the `--adjust-section-vma` argument takes a section name pattern, not just a section name, but this metavar and option description don't imply this. Please revise accordingly.

https://github.com/llvm/llvm-project/pull/72870


More information about the llvm-commits mailing list