This is an archive of the discontinued LLVM Phabricator instance.

[ELF][MIPS] Fix TLS GOT entries for local symbols in shared libraries
ClosedPublic

Authored by arichardson on Jun 11 2018, 1:46 AM.

Details

Summary

Previously LLD would not add any dynamic relocations and write a module
index of 1 which is not correct for the shared library case.
This can happen when a thread-local global variable is marked as local with
a version script. With this change I am now able to link all of the FreeBSD
base system for MIPS64 with LLD.

Diff Detail

Repository
rL LLVM

Event Timeline

arichardson created this revision.Jun 11 2018, 1:46 AM
atanasyan accepted this revision.Jun 11 2018, 2:03 AM

LGTM. I would make the test case smaller by removing commands, directives etc unrelated to the problem.

This revision is now accepted and ready to land.Jun 11 2018, 2:03 AM
This revision was automatically updated to reflect the committed changes.