[PATCH] D28049: [ELF] - Use error() instead of fatal() during relaxation of R_X86_64_GOTTPOFF

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 22 02:22:47 PST 2016


grimar added inline comments.


================
Comment at: test/ELF/invalid/broken-relaxation-x64.s:1-8
+# REQUIRES: x86
+
+# RUN: yaml2obj %s -o %t.o
+# RUN: not ld.lld %t.o -o %t.exe 2>&1 | FileCheck --check-prefix=ERR %s
+# ERR: R_X86_64_GOTTPOFF must be used in MOVQ or ADDQ instructions only
+# ERR: R_X86_64_GOTTPOFF must be used in MOVQ or ADDQ instructions only
+
----------------
davide wrote:
> Please add a comment explaining how you generated this file (so that people unfamiliar with YAML can understand).
hmm, ok. I am going to add something like that then:

```
* Yaml below contains 2 relocations of type R_X86_64_GOTTPOFF, and a .text with fake content filled by 0xFF.
That means instructions for relaxation are "broken", so they does not match any known valid relaxations.
We also generate .tls section because we need it for correct proccessing of STT_TLS symbol.
```


https://reviews.llvm.org/D28049





More information about the llvm-commits mailing list