This is an archive of the discontinued LLVM Phabricator instance.

llvm-readobj: GNU style symbols printing
ClosedPublic

Authored by khemant on Mar 16 2016, 1:42 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

khemant updated this revision to Diff 50866.Mar 16 2016, 1:42 PM
khemant retitled this revision from to llvm-readobj: GNU style symbols printing.
khemant updated this object.
khemant added reviewers: rafael, echristo.
khemant set the repository for this revision to rL LLVM.
khemant added subscribers: rafael, echristo, llvm-commits.

Looks like I forgot to add the test case. Will update the diff.

khemant updated this revision to Diff 50868.Mar 16 2016, 1:47 PM

Added test case.

rafael edited edge metadata.Mar 17 2016, 3:32 PM

Can symbols-proc-specific.elf-hexagon be created with llvm-mc?

tools/llvm-readobj/ELFDumper.cpp
47

There is a getVisibility in Elf_Sym.

184

Please avoid adding this.

You can use dynamic_symbols.

The patch to upstream the processor specific flags for small area is not yet in the Hexagon backend. That is why I made a binary. I do not know of other backends that can get me this flag.

tools/llvm-readobj/ELFDumper.cpp
47

Got it. Will use it

184

I need a way to get the name of the symbol table (both static and dynamic) when the section is present. Any ideas how do I do it?

khemant added inline comments.Mar 17 2016, 4:26 PM
tools/llvm-readobj/ELFDumper.cpp
184

Perhaps storing section name as a StringRef (if found in symbol table) is acceptable?

khemant updated this revision to Diff 51060.Mar 18 2016, 12:41 PM
khemant edited edge metadata.

Incorporated the comments.

Removed storing the section header. Instead if section header present for DT_DYNSYM, save the name.

khemant marked 2 inline comments as done.Mar 18 2016, 12:42 PM
rafael accepted this revision.Mar 21 2016, 8:09 AM
rafael edited edge metadata.

LGTM with nits.

tools/llvm-readobj/ELFDumper.cpp
2546

Add a fallthrough comment.

2585

Start variable name with uppper case.

This revision is now accepted and ready to land.Mar 21 2016, 8:09 AM
This revision was automatically updated to reflect the committed changes.
khemant marked 2 inline comments as done.Mar 21 2016, 10:27 AM