[PATCH] D62964: [llvm-objdump] Include dynamic zero-sized and non-function symbols in disassembly

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 17:06:00 PDT 2019


tabloid.adroit added a comment.

Thanks for the review, MaskRay.

> See not_func is misaligned, so something goes wrong.

I think I might be better to take care of the formatting issue (dumpELFData emits extra tab) in a separate patch. And this one focuses on which symbols should be included in the disassembly output?

> STT_SECTION exists primarily for relocations are they normally have STB_LOCAL binding.
>  None of ld.bfd/gold/lld places STB_LOCAL symbols in .dynsym (I am less confident with the statement regarding ld.bfd) so the updated test may not be used in practice.

@MaskRay @jhenderson @grimar @rupprecht I'm not sure if this has been discussed before, I think it comes down to whether we want llvm-objdump to be compatible with GNU objdump on:

1. well-formed object files (definitely yes)
2. well-formed object files with something not usually produced by static linker etc.. and not explicitly disallowed by ABI (like STT_SECTION symbol in .dynsym in this case)
3. ill-formed object files (maybe not?)

What's your thought?

> deleting the if statement entirely

@jhenderson this seems to assume 1. The patch in its current shape assumes 2?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62964





More information about the llvm-commits mailing list