This is an archive of the discontinued LLVM Phabricator instance.

[elf2] Implement R_X86_64_TPOFF32.
ClosedPublic

Authored by Bigcheese on Nov 3 2015, 12:30 PM.

Details

Summary

This does not support TPOFF32 relocations to local symbols as the address calculations are separate. Support for this will be a separate patch.

Diff Detail

Event Timeline

Bigcheese updated this revision to Diff 39103.Nov 3 2015, 12:30 PM
Bigcheese retitled this revision from to [elf2] Implement R_X86_64_TPOFF32..
Bigcheese updated this object.
Bigcheese added reviewers: ruiu, rafael.
Bigcheese added a subscriber: llvm-commits.
ruiu added inline comments.Nov 3 2015, 12:46 PM
ELF/OutputSections.h
357

Let's typedef uintX_t here to avoid line wrapping.

375

This name is too long. How about TlsTemplateVA?

Bigcheese added inline comments.Nov 3 2015, 2:17 PM
ELF/OutputSections.h
375

Initialization image is the term of art for this. How about TlsInitImageVA?

ruiu added inline comments.Nov 3 2015, 2:19 PM
ELF/OutputSections.h
375

I think I still kind of like template (mainly because it's just one word), and that's used in Ulrich Drepper's document too (http://www.akkadia.org/drepper/tls.pdf)

Bigcheese updated this revision to Diff 39120.Nov 3 2015, 2:26 PM

Change name and simplify uintX_t.

Bigcheese added inline comments.Nov 3 2015, 2:31 PM
ELF/OutputSections.h
375

In 2 places vs the 18 uses of initialization image.

ruiu accepted this revision.Nov 3 2015, 2:34 PM
ruiu edited edge metadata.

LGTM with a few nits.

ELF/OutputSections.cpp
648

Remove () from "(A + B) - C".

ELF/OutputSections.h
356

Nothing wrong with the template aliasing, but that's different from other code. Use typedef instead for consistency.

typedef typename llvm::object::ELFFile<ELFT>::uintX_t uintX_t;
375

I have no strong preference, so I'm OK with InitImage.

This revision is now accepted and ready to land.Nov 3 2015, 2:34 PM
Bigcheese accepted this revision.Nov 3 2015, 2:42 PM
Bigcheese closed this revision.
Bigcheese added a reviewer: Bigcheese.

r251998