Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Looks good to me. I think something similar to this was included in one of my previous patches, and just got lost somewhere.
I'm busy on other things at work, so I've had to put Wasm to the side for the last few months, but I'm hoping to get back to polishing and submitting some more stuff - when I'm able!
lib/MC/WasmObjectWriter.cpp | ||
---|---|---|
906–910 ↗ | (On Diff #161819) | Should this be stable_sort? (I think LLVM is trying to remove uses of the unstable/non-deterministic version.) Alternatively could assert that it's sorted, since it seems in practice that it is (and the assert would make sure that stays the case). |
- fixup
- stable_sort
lib/MC/WasmObjectWriter.cpp | ||
---|---|---|
906–910 ↗ | (On Diff #161819) | I tracked down some cases where its not ordered. The issue is that we order the function according to the order of the Asm.symbols() list, an not the order of the sections in Asm. If we followed the sections order (I wrote a patch for this to confirm) we would most likely be ordered in most cases today, but I'm not sure that is guaranteed anywhere in LLVM. So I think certainly now we need to sort. Other plaforms do this reloc sorting too. See MCELFObjectTargetWriter::sortRelocs |