llvm-project/llvm/tools/llvm-readobj
Matt Davis 0d0e9c08a4 [llvm-readobj] Display sections that do not belong to a segment in the section-mapping
Summary:
The following patch adds the "None" line to the section to segment mapping dump.
That line lists the sections that do not belong to any segment.
I realize that this change differs from GNU readelf which does not display the latter information.

I'd rather not add this "feature" under a command line option.  I think that might introduce confusion, since users would have to
make an additional decision as to if they want to see all of the section-to-segment map or just a subset of it.

Another option is to only print the "None" line if the `--section-mapping` option is passed; however,
that might also introduce some confusion, because the section-to-segment map would be different between`--program-headers`
and the `--section-mapping` output.  While the difference is just the "None" line, it seems that if we choose to display
the segment-to-section mapping, then we should always display the whole map including the sections
that do not belong to segments.

```
Section to Segment mapping:
  Segment Sections...
   00
   01     .interp
   02     .interp .note.ABI-tag .gnu.hash
   03     .init_array .fini_array .dynamic
   04     .dynamic
   05     .note.ABI-tag
   06     .eh_frame_hdr
   07
   08     .init_array .fini_array .dynamic .got
   None   .comment .symtab .strtab .shstrtab <--- THIS LINE
```

Reviewers: grimar, rupprecht, jhenderson, espindola

Reviewed By: rupprecht

Subscribers: khemant, emaste, arichardson, llvm-commits

Differential Revision: https://reviews.llvm.org/D57700

llvm-svn: 353217
2019-02-05 21:01:01 +00:00
..
ARMEHABIPrinter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ARMWinEHPrinter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ARMWinEHPrinter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt Add a missing dependency to fix build. 2019-01-17 17:55:47 +00:00
COFFDumper.cpp [llvm-readelf] Don't suppress static symbol table with --dyn-symbols + --symbols 2019-01-23 16:15:39 +00:00
COFFImportDumper.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DwarfCFIEHPrinter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ELFDumper.cpp [llvm-readobj] Display sections that do not belong to a segment in the section-mapping 2019-02-05 21:01:01 +00:00
Error.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Error.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MachODumper.cpp [llvm-readelf] Don't suppress static symbol table with --dyn-symbols + --symbols 2019-01-23 16:15:39 +00:00
ObjDumper.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ObjDumper.h [llvm-readobj] Add a flag to dump just the section-to-segment mapping. 2019-02-01 18:51:10 +00:00
StackMapPrinter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WasmDumper.cpp [llvm-readobj] Report more WebAssembly symbol info 2019-02-04 22:27:46 +00:00
Win64EHDumper.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Win64EHDumper.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WindowsResourceDumper.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WindowsResourceDumper.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-readobj.cpp [llvm-readobj] Add a flag to dump just the section-to-segment mapping. 2019-02-01 18:51:10 +00:00
llvm-readobj.h [llvm-readelf] Don't suppress static symbol table with --dyn-symbols + --symbols 2019-01-23 16:15:39 +00:00