This is an archive of the discontinued LLVM Phabricator instance.

Fix parsing of the plt section for android-arm
ClosedPublic

Authored by tberghammer on May 7 2015, 7:20 AM.

Details

Summary

Fix parsing of the plt section for android-arm

The ELF data contains two different errors in some ELF files on android.

  • The link field of the symbol table don't point to the plt section or to the dynsym section even when it is present in the ELF files.
  • The size of the plt entries aren't specified in the section header of the plt section.

This CL adds some workarounds for these two issue with finding the
sections by name if the link field is empty and by using a heuristic to
calculate the size and offset of the plt entries.

Diff Detail

Repository
rL LLVM

Event Timeline

tberghammer updated this revision to Diff 25180.May 7 2015, 7:20 AM
tberghammer retitled this revision from to Fix parsing of the plt section for android-arm.
tberghammer updated this object.
tberghammer edited the test plan for this revision. (Show Details)
tberghammer added a reviewer: clayborg.
tberghammer added a subscriber: Unknown Object (MLST).
clayborg accepted this revision.May 7 2015, 10:04 AM
clayborg edited edge metadata.

Fix the comment type and good to go.

source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
2241 ↗(On Diff #25180)

s/don't/doesn't/

This revision is now accepted and ready to land.May 7 2015, 10:04 AM
This revision was automatically updated to reflect the committed changes.