This is an archive of the discontinued LLVM Phabricator instance.

ARM: replace branches to undefined weak functions with NOP
ClosedPublic

Authored by lenykholodov on Apr 2 2015, 12:41 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

lenykholodov retitled this revision from to ARM: replace branches to undefined weak functions with NOP.
lenykholodov updated this object.
lenykholodov edited the test plan for this revision. (Show Details)
lenykholodov set the repository for this revision to rL LLVM.
lenykholodov added a project: lld.
lenykholodov added a subscriber: Unknown Object (MLST).
lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp
509 ↗(On Diff #23174)

The NOP instruction is supported by only limited number of ARM architectures.
You may at least add a TODO at the beginning of the function to indicate this.

539 ↗(On Diff #23174)

Maybe better to log only successive fixups? Don't think the information about unresolved weaks is really useful.

  • rabase with master;
  • debug output only for successfull fixups;
  • todo remark.
denis-protivensky edited edge metadata.

LGTM with nits.

lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp
500 ↗(On Diff #23361)

The name of the function should reflect that you only fixup call-like instructions.
fixupUnresolvedWeakCall sounds more correct.

539 ↗(On Diff #23361)

You mix *unresolved* with *undefined* in this whole fragment of added code.
Please, be consistent. I think *unresolved* sounds better here.

541 ↗(On Diff #23361)

result is a bad name for variable. Consider something having word fixed in it.

This revision is now accepted and ready to land.Apr 8 2015, 12:07 AM
lenykholodov edited edge metadata.
  1. Rebase with master.
  2. Update code according to the comments from reviewers.
This revision was automatically updated to reflect the committed changes.