This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Properly handle R_386_GOTPC relocation.
ClosedPublic

Authored by grimar on May 31 2017, 3:46 AM.

Details

Summary

This is PR33243. R_GOTONLY_PC_FROM_END was not in a list of link time constant
expressions and that was a result of confusiing messages like PR shows:

/usr/bin/ld.lld: error: /usr/lib/go/src/runtime/alg.go:47:
can't create dynamic relocation R_386_GOTPC against local symbol in readonly segment defined in /tmp/nice/go-link-597453838/go.o

Though in reality we just should not have try to create a dynamic relocation for this case at all.

Patch fixes the issue.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar created this revision.May 31 2017, 3:46 AM
This revision was automatically updated to reflect the committed changes.