HomePhabricator

Find .plt section in object files generated by recent ld

Description

Find .plt section in object files generated by recent ld

Code in ObjectFileELF::ParseTrampolineSymbols assumes that the sh_info
field of the .rel(a).plt section identifies the .plt section.

However, with recent GNU ld this is no longer true. As a result of this:
https://sourceware.org/bugzilla/show_bug.cgi?id=18169
in object files generated with current linkers the sh_info field of
.rel(a).plt now points to the .got.plt section (or .got on some targets).

This causes LLDB to fail to identify any PLT stubs, causing a number of
test case failures.

This patch changes LLDB to simply always look for the .plt section by
name. This should be safe across all linkers and targets.

Differential Revision: http://reviews.llvm.org/D18973

Details

Committed
uweigandApr 14 2016, 7:36 AM
Differential Revision
D18973: Find .plt section in object files generated by recent ld
Parents
rL266315: Fix test cases for big-endian systems
Branches
Unknown
Tags
Unknown