This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Use error() instead of fatal() during relaxation of R_X86_64_GOTTPOFF
ClosedPublic

Authored by grimar on Dec 22 2016, 2:04 AM.

Details

Summary

This is last known noticable fatal() in target.cpp.
We also have other ones for unknown relocations or
creating unknown targets, but that one can be just error I think.

Used yaml2obj to generate test.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar updated this revision to Diff 82318.Dec 22 2016, 2:04 AM
grimar retitled this revision from to [ELF] - Use error() instead of fatal() during relaxation of R_X86_64_GOTTPOFF.
grimar updated this object.
grimar added reviewers: ruiu, rafael, davide.
grimar added subscribers: llvm-commits, grimar, evgeny777.
davide edited edge metadata.Dec 22 2016, 2:16 AM

I guess this is OK once you address my comment.

test/ELF/invalid/broken-relaxation-x64.s
1–8 ↗(On Diff #82318)

Please add a comment explaining how you generated this file (so that people unfamiliar with YAML can understand).

grimar added inline comments.Dec 22 2016, 2:22 AM
test/ELF/invalid/broken-relaxation-x64.s
1–8 ↗(On Diff #82318)

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.
This revision was automatically updated to reflect the committed changes.