Page MenuHomePhabricator

Object: Add SF_Text symbol flag.
ClosedPublic

Authored by pcc on Nov 23 2016, 4:09 PM.

Details

Summary

This allows us to remove a few uses of IRObjectFile::getSymbolGV() in
llvm-nm.

While here change host-dependent logic in llvm-nm to target-dependent
logic.

Depends on D27074

Diff Detail

Repository
rL LLVM

Event Timeline

pcc updated this revision to Diff 79167.Nov 23 2016, 4:09 PM
pcc retitled this revision from to Object: Add SF_Text symbol flag..
pcc updated this object.
pcc added a reviewer: mehdi_amini.
pcc added subscribers: llvm-commits, rafael.
mehdi_amini added inline comments.Nov 23 2016, 7:51 PM
llvm/lib/Object/ModuleSymbolTable.cpp
166 ↗(On Diff #79167)

Why the test on the presence of a section? Do we have a test that exercise this?

pcc added inline comments.Nov 23 2016, 7:56 PM
llvm/lib/Object/ModuleSymbolTable.cpp
166 ↗(On Diff #79167)

It's a rough approximation for "is this function in the .text section or not". I don't think there's a test, I'll add one.

pcc updated this revision to Diff 79850.Nov 30 2016, 6:27 PM
  • Rename SF_Text -> SF_Executable; remove hasSection check
mehdi_amini accepted this revision.Nov 30 2016, 8:26 PM
mehdi_amini edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Nov 30 2016, 8:26 PM
This revision was automatically updated to reflect the committed changes.