[llvm-objdump] -d: don't display mapping symbols as labels
Similar to D96617 for llvm-symbolizer. This patch matches the GNU objdump -d behavior to suppress printing labels for mapping symbols. Mapping symbol names don't convey much information. When --show-all-symbols (not in GNU) is specified, we still print mapping symbols. Note: the `for (size_t SI = 0, SE = Symbols.size(); SI != SE;)` loops needs to iterate all mapping symbols, even if they are not displayed. We use the new field `IsMappingSymbol` to recognize mapping symbols. This field also enables simplification after D139131. ELF/ARM/disassemble-all-mapping-symbols.s is enhanced to add `.space 2`. If `End = std::min(End, Symbols[SI].Addr);` is not correctly set, we would print a `.word`. Reviewed By: jhenderson, jobnoorman, peter.smith Differential Revision: https://reviews.llvm.org/D156190
parent
74b6b113
Please register or sign in to comment