This is an archive of the discontinued LLVM Phabricator instance.

[ARM]Add a NOP instruction to make LLVM generate a mapping symbol
ClosedPublic

Authored by shankare on Mar 30 2017, 9:26 AM.

Details

Summary

This is a test change applicable for ARM targets.

Previously LLVM would generate a mapping symbol when code contains only
data. This was changed as part of

https://reviews.llvm.org/D30724

and to be more close to the ARM ELF ABI.

The test case is changed to check for behavior with minimal changes.

Diff Detail

Repository
rL LLVM

Event Timeline

shankare created this revision.Mar 30 2017, 9:26 AM
ruiu edited edge metadata.Mar 30 2017, 12:14 PM

Peter Smith, are you fine with this change?

Hi,

I'm confused about how this test change is actually checking for any change in behaviour. No CHECK lines have been updated - have I missed something? Is the test currently failing?

Cheers,

James

peter.smith accepted this revision.Mar 31 2017, 1:51 AM

My understanding is that this test failed when a change went in to llvm-mc to not emit the mapping symbol $d.0 when the section contains only data. The test here is checking for the $d.0. Adding the nop forces the creation of a $a.0 which then forces the creation of the $d.0, this will make the test more robust against llvm-mc changes.

I think that this is a reasonably pragmatic change, I'm happy to see it go in although I think it would be worth a comment saying something like Force creation of $d.0 mapping symbol. Another possibility is to just remove the RELATIVE: $d.0: line as it isn't necessary for the output of the test (check R_ARM_TARGET1).

This revision is now accepted and ready to land.Mar 31 2017, 1:51 AM

Can you please merge the change ?

I can do, although there isn't any special permissions to commit to lld, if you can commit to llvm then you can commit to lld. Let me know if you'd prefer to do it yourself? Otherwise I'll do it in an hour.

This revision was automatically updated to reflect the committed changes.

Ok now merged as r299212