This is an archive of the discontinued LLVM Phabricator instance.

COFF: include relocation type in unsupported relocation message
ClosedPublic

Authored by inglorion on Jan 11 2017, 1:20 PM.

Details

Summary

When we encouter a relocation type we don't know how to handle, this change causes us to print out the hexadecimal value of the relocation type. This makes troubleshooting a little easier.

Diff Detail

Repository
rL LLVM

Event Timeline

inglorion updated this revision to Diff 84014.Jan 11 2017, 1:20 PM
inglorion retitled this revision from to COFF: include relocation type in unsupported relocation message.
inglorion updated this object.
inglorion added reviewers: ruiu, zturner.
ruiu edited edge metadata.Jan 11 2017, 1:22 PM

For ELF, we print out unknown relocation numbers in decimal. Is there any reason to prefer hexadecimal? At least they need leading "0x" to disambiguate.

I chose hex because that's what we use in the source code to define the values. I'll prefix them with 0x to make that clear.

ruiu added a comment.Jan 11 2017, 2:58 PM

We are not using formatv at the moment, so at least for now, please stick with utohexstr.

inglorion updated this revision to Diff 84354.Jan 13 2017, 12:24 PM
inglorion edited edge metadata.

Prefix hexadecimal numbers with "0x"

ruiu accepted this revision.Jan 13 2017, 12:48 PM
ruiu edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jan 13 2017, 12:48 PM
This revision was automatically updated to reflect the committed changes.