[PATCH] D71278: Add support for TLS IEGOT relocations

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 09:13:59 PST 2019


MaskRay added inline comments.


================
Comment at: lld/test/ELF/hexagon-tls-ie-got.s:1
+# REQUIRES: hexagon
+# RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf %s -o %t1.o
----------------
Probably delete `-got` from the filename. Initial Exec uses GOT on all targets.


================
Comment at: lld/test/ELF/hexagon-tls-ie-got.s:3
+# RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf %s -o %t1.o
+# RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf %p/Inputs/hexagon-tls-ie.s -o %t2.o
+# RUN: ld.lld -shared %t1.o %t2.o -o %t
----------------
You can place the definitions in the same file. A definition in a DSO is by default preemptible (unless marked as non-STV_DEFAULT, or -Bsymbolic)

See `ppc32-tls-ie.s` for an example.


================
Comment at: lld/test/ELF/hexagon-tls-ie-got.s:7
+# RUN: llvm-readelf -r  %t | FileCheck -check-prefix=CHECK-RELA %s
+
+	.globl	_start
----------------
In the previous review, you mentioned that Hexagon does not support TLS relaxations. It is worth testing this property explicitly. See the `ld.lld %t.o -o %t` and `LE:` `LE-NEXT:` part of `ppc32-tls-ie.s`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71278/new/

https://reviews.llvm.org/D71278





More information about the llvm-commits mailing list