This is an archive of the discontinued LLVM Phabricator instance.

ELF/AMDGPU: Add support for R_AMDGPU_ABS32
ClosedPublic

Authored by kzhuravl on Jun 23 2016, 10:51 AM.

Diff Detail

Event Timeline

kzhuravl updated this revision to Diff 61701.Jun 23 2016, 10:51 AM
kzhuravl retitled this revision from to ELF/AMDGPU: Add support for R_AMDGPU_ABS32.
kzhuravl updated this object.
kzhuravl added a subscriber: llvm-commits.
test/ELF/amdgpu-relocs-abs32.s
23 ↗(On Diff #61701)

Is the full kernel_code_t definition required for this test?

kzhuravl updated this revision to Diff 63139.Jul 7 2016, 2:34 PM

Rebase and update test

ruiu added a subscriber: ruiu.Jul 7 2016, 3:06 PM
ruiu added inline comments.
ELF/Target.cpp
1462–1464

Sort alphabetically.

rafael edited edge metadata.Jul 8 2016, 4:48 AM
rafael added a subscriber: rafael.

we don't use llc to test elf lld.

kzhuravl updated this revision to Diff 63263.Jul 8 2016, 11:15 AM
kzhuravl edited edge metadata.
kzhuravl marked an inline comment as done.

Feedback + update test

ruiu added a comment.Jul 8 2016, 11:18 AM

Verifying an entire dwarf file to test ABS32 relocations seems a bit overkill. Why don't you add a few lines to test/ELF/amdgpu-relocs.s?

R_AMDGPU_ABS32 relocations are only generated for dwarf

ruiu added a comment.Jul 14 2016, 10:23 AM

The fact that ABS32 is generated only for DWARF does not necessarily mean that you need to create a DWARF to verify the behavior of the relocation. I was trying to say was that the test is too big compared to the size of the feature that is testing; it mostly verifies the structure of DWARF rather than the relocation. A test for ABS32 can be written in a few lines.

kzhuravl updated this revision to Diff 64523.Jul 19 2016, 10:46 AM

Update test

ruiu accepted this revision.Jul 19 2016, 10:58 AM
ruiu added a reviewer: ruiu.

Don't you want to verify the contents of .data section?

This revision is now accepted and ready to land.Jul 19 2016, 10:58 AM
kzhuravl updated this revision to Diff 64535.Jul 19 2016, 11:53 AM
kzhuravl edited edge metadata.

Update test

This revision was automatically updated to reflect the committed changes.