This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Fix copy relocation when two symbols share the same address.
AbandonedPublic

Authored by MaskRay on Jun 9 2018, 2:02 AM.

Details

Reviewers
espindola
Summary

In glibc libc.so.6, the multiple versions of _sys_errlist share the same address. When _sys_errlist is copy relocated, we would replace SharedSymbol with Defined in the first iteration of the following loop:

for (SharedSymbol *Sym : getSymbolsAt<ELFT>(SS))

Then in the second iteration, we think the symbol (which has been changed to Defined) is still SharedSymbol and screw up.

Event Timeline

MaskRay created this revision.Jun 9 2018, 2:02 AM
Harbormaster completed remote builds in B19131: Diff 150611.
MaskRay abandoned this revision.Jun 9 2018, 9:05 AM

Landed in 2389a240d02bd8440995e2ad630958e1971ebec7

Herald added a project: Restricted Project. · View Herald TranscriptSun, Jan 21, 4:45 PM