[PATCH] D111240: [llvm-readelf][docs] Add missing options and details to the help output and the command guide

Owen Reynolds via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 7 09:11:46 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
gbreynoo marked 2 inline comments as done.
Closed by commit rG14d76a376a41: [llvm-readelf][docs] Add missing options and details to the help output and theā€¦ (authored by gbreynoo).

Changed prior to commit:
  https://reviews.llvm.org/D111240?vs=377568&id=377882#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111240/new/

https://reviews.llvm.org/D111240

Files:
  llvm/docs/CommandGuide/llvm-readelf.rst
  llvm/tools/llvm-readobj/Opts.td


Index: llvm/tools/llvm-readobj/Opts.td
===================================================================
--- llvm/tools/llvm-readobj/Opts.td
+++ llvm/tools/llvm-readobj/Opts.td
@@ -29,14 +29,14 @@
 def headers : FF<"headers", "Equivalent to setting: --file-header, --program-headers, --section-headers">;
 defm hex_dump : Eq<"hex-dump", "Display the specified section(s) as hexadecimal bytes">, MetaVarName<"<name or index>">;
 def relocs : FF<"relocs", "Display the relocation entries in the file">;
-def section_data : FF<"section-data", "Display section data for each section shown">;
+def section_data : FF<"section-data", "Display section data for each section shown. This option has no effect for GNU style output">;
 def section_details : FF<"section-details", "Display the section details">;
 def section_headers : FF<"section-headers", "Display section headers">;
 def section_mapping : FF<"section-mapping", "Display the section to segment mapping">;
 def section_mapping_EQ_false : FF<"section-mapping=false", "Don't display the section to segment mapping">, Flags<[HelpHidden]>;
-def section_relocations : FF<"section-relocations", "Display relocations for each section shown">;
-def section_symbols : FF<"section-symbols", "Display symbols for each section shown">;
-def stack_sizes : FF<"stack-sizes", "Display contents of all stack sizes sections">;
+def section_relocations : FF<"section-relocations", "Display relocations for each section shown. This option has no effect for GNU style output">;
+def section_symbols : FF<"section-symbols", "Display symbols for each section shown. This option has no effect for GNU style output">;
+def stack_sizes : FF<"stack-sizes", "Display contents of all stack sizes sections. This option has no effect for GNU style output">;
 def stackmap : FF<"stackmap", "Display contents of stackmap section">;
 defm string_dump : Eq<"string-dump", "Display the specified section(s) as a list of strings">, MetaVarName<"<name or index>">;
 def string_table : FF<"string-table", "Display the string table (only for XCOFF now)">;
@@ -47,10 +47,10 @@
 def grp_elf : OptionGroup<"kind">, HelpText<"OPTIONS (ELF specific)">;
 def dynamic_table : FF<"dynamic-table", "Display the dynamic section table">, Group<grp_elf>;
 def elf_linker_options : FF<"elf-linker-options", "Display the .linker-options section">, Group<grp_elf>;
-defm elf_output_style : Eq<"elf-output-style", "Specify ELF dump style">, Group<grp_elf>;
+defm elf_output_style : Eq<"elf-output-style", "Specify ELF dump style: LLVM or GNU">, Group<grp_elf>;
 def histogram : FF<"histogram", "Display bucket list histogram for hash sections">, Group<grp_elf>;
 def section_groups : FF<"section-groups", "Display section groups">, Group<grp_elf>;
-def gnu_hash_table : FF<"gnu-hash-table", "Display .gnu.hash section">, Group<grp_elf>;
+def gnu_hash_table : FF<"gnu-hash-table", "Display the GNU hash table for dynamic symbols">, Group<grp_elf>;
 def hash_symbols : FF<"hash-symbols", "Display the dynamic symbols derived from the hash section">, Group<grp_elf>;
 def hash_table : FF<"hash-table", "Display .hash section">, Group<grp_elf>;
 def needed_libs : FF<"needed-libs", "Display the needed libraries">, Group<grp_elf>;
Index: llvm/docs/CommandGuide/llvm-readelf.rst
===================================================================
--- llvm/docs/CommandGuide/llvm-readelf.rst
+++ llvm/docs/CommandGuide/llvm-readelf.rst
@@ -20,7 +20,7 @@
 OPTIONS
 -------
 
-.. option:: --all
+.. option:: --all, -a
 
  Equivalent to specifying all the main display options relevant to the file
  format.
@@ -41,6 +41,10 @@
 .. option:: --demangle, -C
 
  Display demangled symbol names in the output.
+ 
+.. option:: --dependent-libraries
+
+ Display the dependent libraries section.
 
 .. option:: --dyn-relocations
 
@@ -114,6 +118,10 @@
 .. option:: --needed-libs
 
  Display the needed libraries.
+  
+.. option:: --no-demangle
+
+ Do not display demangled symbol names in the output. On by default.
 
 .. option:: --notes, -n
 
@@ -175,7 +183,7 @@
 
 .. option:: --symbols, --syms, -s
 
- Display the symbol table.
+ Display the symbol table. Also display the dynamic symbol table when using GNU output style for ELF.
 
 .. option:: --unwind, -u
 
@@ -188,7 +196,11 @@
 .. option:: --version-info, -V
 
  Display version sections.
+ 
+.. option:: --wide, -W
 
+ Ignored for GNU readelf compatibility. The output is already similar to when using -W with GNU readelf.
+ 
 .. option:: @<FILE>
 
  Read command-line options from response file `<FILE>`.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111240.377882.patch
Type: text/x-patch
Size: 4551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211007/4c75e489/attachment.bin>


More information about the llvm-commits mailing list