This is an archive of the discontinued LLVM Phabricator instance.

[LLD][TEST] Add a test case for negative addends for R_X86_64_PC32 relocations
ClosedPublic

Authored by gbreynoo on Oct 14 2021, 6:53 AM.

Details

Summary

This test is derived from a test case we have locally but I could not see an equivalent in LLD's testing.

Diff Detail

Event Timeline

gbreynoo created this revision.Oct 14 2021, 6:53 AM
gbreynoo requested review of this revision.Oct 14 2021, 6:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 14 2021, 6:53 AM

You may rename x86-64-reloc-32-fpic.s as appropriate and add the new test there, too.

gbreynoo updated this revision to Diff 379997.Oct 15 2021, 7:32 AM

As suggested by Maskray I have renamed x86-64-reloc-32-fpic.s and added a R_X86_64_32 equivalent of the test. To be consistent x86-64-reloc-pc32-fpic.s was also renamed and the new test case added.
Note that git doesn't appear to detect the renames, it may be best for me to commit the code change and rename separately?

MaskRay accepted this revision.Oct 15 2021, 4:56 PM

As suggested by Maskray I have renamed x86-64-reloc-32-fpic.s and added a R_X86_64_32 equivalent of the test. To be consistent x86-64-reloc-pc32-fpic.s was also renamed and the new test case added.
Note that git doesn't appear to detect the renames, it may be best for me to commit the code change and rename separately?

I think that's unnecessary. We already need to look at deleted commits if archaeology on the whole history is needed in the future (likely no for this case).

This revision is now accepted and ready to land.Oct 15 2021, 4:56 PM
This revision was landed with ongoing or failed builds.Oct 18 2021, 8:39 AM
This revision was automatically updated to reflect the committed changes.
lld/test/ELF/x86-64-reloc-32.s