This is an archive of the discontinued LLVM Phabricator instance.

[WebAssebmly] Report undefined symbols correctly in objdump
ClosedPublic

Authored by sbc100 on Feb 8 2018, 4:28 PM.

Details

Summary

Peviously we were reporting undefined symbol as being defined
by the IMPORT sections.

This change reports undefined symbols in the same that other
formats do, and also removes the need to store the section
with each symbol (since it can be derived from the symbol
type).

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Feb 8 2018, 4:28 PM
sbc100 added a reviewer: ncw.Feb 8 2018, 4:30 PM
dberris accepted this revision.Feb 8 2018, 9:24 PM
dberris added a subscriber: dberris.

LGTM

This revision is now accepted and ready to land.Feb 8 2018, 9:24 PM
This revision was automatically updated to reflect the committed changes.
ncw added a comment.Feb 9 2018, 12:26 PM

This looks good, maybe you spotted it could be improved when you saw I'd thoughtlessly copied the current llvm-objdump output for the new data/global symbol split!

There will be conflicts with the symtab work, but not especially hard to resolve. Having said that, I think the conflicts and merge procedure would be rather simpler if the symtab stuff went in first (since it's a bigger thing to rebase and rejig overall).

Edit: d'oh, you merged it literally as I was typing :(

sbc100 added a comment.Feb 9 2018, 1:33 PM
In D43101#1003747, @ncw wrote:

This looks good, maybe you spotted it could be improved when you saw I'd thoughtlessly copied the current llvm-objdump output for the new data/global symbol split!

There will be conflicts with the symtab work, but not especially hard to resolve. Having said that, I think the conflicts and merge procedure would be rather simpler if the symtab stuff went in first (since it's a bigger thing to rebase and rejig overall).

Edit: d'oh, you merged it literally as I was typing :(

I've already got your patches resolved and sitting on top of this. I not sure how you feel about me taking them on, but I'm currently experimenting with them a little. If you want to rebase you can, or I can keep working on my locally rebased version. The lld-side I was thinking about is a lot more conflicting so I might land symtab before it: https://reviews.llvm.org/D43112

ncw added a comment.Feb 9 2018, 1:50 PM

I've already got your patches resolved and sitting on top of this. I not sure how you feel about me taking them on, but I'm currently experimenting with them a little. If you want to rebase you can, or I can keep working on my locally rebased version. The lld-side I was thinking about is a lot more conflicting so I might land symtab before it: https://reviews.llvm.org/D43112

That's fantastic, OK, I'm very happy for you to take them on and modify before you merge, thanks!

ncw added a comment.Feb 9 2018, 2:00 PM

Having said that - I do have a queue of ~ten patches built on top of the symtab work; I do have in mind a sequence of tidy-ups and various changes to reorder/rename and extend the bits that are missing. So if you're adding much to it, it may that I have a similar patch already waiting. Maybe not though; change it as you want! I've learned my lesson from the last time I tried to set up a chain of 7 reviews though, it didn't work well.