This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Ignore R_386_NONE.
ClosedPublic

Authored by grimar on Jan 11 2017, 3:01 AM.

Details

Summary

R_X86_64_NONE is ignored starting from r288485,
I guess we want to do the same for R_386_NONE ?
Currently we error out this relocation as not supported and
ignoring seems to be correct behavior.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar updated this revision to Diff 83940.Jan 11 2017, 3:01 AM
grimar retitled this revision from to [ELF] - Ignore R_386_NONE..
grimar updated this object.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar, evgeny777.
This revision was automatically updated to reflect the committed changes.
ruiu edited edge metadata.Jan 11 2017, 10:23 AM

I guess that all psABIs define R_*_NONE relocations. If that's the case, you want to add R_*_NONE relocations for all archs.

davide added a subscriber: davide.Jan 11 2017, 10:50 AM
In D28552#643017, @ruiu wrote:

I guess that all psABIs define R_*_NONE relocations. If that's the case, you want to add R_*_NONE relocations for all archs.

I wasn't able to find the semantic of R_X86_64_NONE in (https://software.intel.com/sites/default/files/article/402129/mpx-linux64-abi.pdf), I'm pretty sure dtrace (ab)uses of it but that's kind of a special case (not sure if gas can ever emit that). I think it should be clarified (maybe starting a discussion on the psABI mailing list).

ruiu added a comment.Jan 11 2017, 10:56 AM

How does dtrace use that? I was thinking that the semantics of the relocation is pretty clear -- that is a relocation which doesn't change the target values.

In D28552#643063, @ruiu wrote:

How does dtrace use that? I was thinking that the semantics of the relocation is pretty clear -- that is a relocation which doesn't change the target values.

Then why you need to emit a reloc in the first place (if that reloc is de facto a nop)?

See http://llvm.org/viewvc/llvm-project?rev=288485&view=rev for the dtrace use.