This is an archive of the discontinued LLVM Phabricator instance.

[COFF] RelocPtr is now a ulittle32_t pointer in LLVM
ClosedPublic

Authored by jrtc27 on Nov 7 2018, 6:15 AM.

Details

Summary

The type of RelocPtr has changed from uint32_t* to ulittle32_t*, as it
is pointing to little-endian data, so update our code to match. This
fixes COFF/pdb-framedata.yaml on big-endian hosts.

Event Timeline

jrtc27 created this revision.Nov 7 2018, 6:15 AM

I think the fix should in the api call which should probably return the
correct endian aware type

ruiu added a comment.Nov 13 2018, 12:30 AM

I agree with Zach. If this API cannot be used correctly without reinterpret_cast, the return type needs fixing.

jrtc27 updated this revision to Diff 173822.Nov 13 2018, 2:20 AM

Remove reinterpret_cast and use D54421

jrtc27 retitled this revision from [COFF] Fix RvaStart calculation on big-endian hosts to [COFF] RelocPtr is now a ulittle32_t pointer in LLVM.
jrtc27 edited the summary of this revision. (Show Details)
ruiu accepted this revision.Nov 14 2018, 12:05 AM

LGTM

This revision is now accepted and ready to land.Nov 14 2018, 12:05 AM

Ping? Stack is now empty.

jrtc27 closed this revision.Nov 30 2018, 6:13 AM

Ah, never mind, D54421 was updated to also patch lld at the same time, so this has been merged already.