This is an archive of the discontinued LLVM Phabricator instance.

[ELF][Hexagon]Add TPREL relocation support to Hexagon
ClosedPublic

Authored by sidneym on Dec 5 2019, 8:52 AM.

Details

Summary

Adds support for tls TPREL relocations.

Diff Detail

Event Timeline

sidneym created this revision.Dec 5 2019, 8:52 AM
Herald added a project: Restricted Project. · View Herald Transcript
MaskRay added inline comments.Dec 5 2019, 12:31 PM
lld/test/ELF/hexagon-tls-tprel.s
33 ↗(On Diff #232363)

// @a and // 0x1 below are redundant.

sidneym updated this revision to Diff 232836.Dec 9 2019, 6:41 AM

remove redundant comments

ruiu accepted this revision.Dec 10 2019, 10:16 PM

LGTM

This revision is now accepted and ready to land.Dec 10 2019, 10:16 PM
MaskRay added inline comments.Dec 10 2019, 10:31 PM
lld/test/ELF/hexagon-tls-tprel.s
1 ↗(On Diff #232836)

Maybe rename this test to hexagon-tls-le.s (See ppc32-tls-le.s)

Basically, I want the 4 TLS model tests to be named -le -ie` -ld and -gd.

MaskRay added inline comments.Dec 10 2019, 10:33 PM
lld/test/ELF/hexagon-tls-tprel.s
41 ↗(On Diff #232836)

Don't simply copy clang output.

Directives like .type b,@object should be deleted. The symbol a b etc are of type STT_TYPE, not STT_OBJECT. The directives used here are just confusing.

41 ↗(On Diff #232836)

Directives like .type b,@object should be deleted. The symbol a b etc are of type STT_TLS, not STT_OBJECT. The directives used here are just confusing.

sidneym updated this revision to Diff 235886.Jan 2 2020, 8:36 AM

Change testcase name to hexagon-tls-le.s

This revision was automatically updated to reflect the committed changes.
MaskRay added inline comments.Jan 2 2020, 9:54 AM
lld/test/ELF/hexagon-tls-le.s
12

Testing relocations with llvm-readobj -r may be better. See https://reviews.llvm.org/rG47e3d3ec0c5607ae3bc6181537c0622080f3af27gg

Created D72093