See D42279
Diff Detail
- Repository
- rLLD LLVM Linker
- Build Status
Buildable 14008 Build 14008: arc lint + arc unit
Event Timeline
wasm/Writer.cpp | ||
---|---|---|
397 | Does this really work? I had to introduce the concept of "output symbol index" (getOutputSymbolIndex) for writing out the relocations and syminfo in LLD. That's because LLD doesn't have (and never has had) the duplicate-import fiddle that WasmObjectWriter has (LLD uses the "alt indexes" when it reads in the files, but it can't write them out). So how can the function's output index work here - when it's not the same concept as the symbol output index? The function and symbol indexes can diverge. It's very very close to being correct, but I don't think it is fully correct. The #5 changes do need to come first for this to be "right". Once it's fixed, relocatable.ll should gain some tests for aliases, since it looks like it doesn't have any, oops. |
I suppose this could be merged, since it doesn't make things worse. LLD --relocatable output is already broken for aliases, but it doesn't feel great to be introducing another place where it comes unstuck.
At the very least, it needs a comment added to the getOutputIndex() call saying // TODO fixme once we have symbol indexes.
Does this really work? I had to introduce the concept of "output symbol index" (getOutputSymbolIndex) for writing out the relocations and syminfo in LLD.
That's because LLD doesn't have (and never has had) the duplicate-import fiddle that WasmObjectWriter has (LLD uses the "alt indexes" when it reads in the files, but it can't write them out).
So how can the function's output index work here - when it's not the same concept as the symbol output index? The function and symbol indexes can diverge.
It's very very close to being correct, but I don't think it is fully correct.
The #5 changes do need to come first for this to be "right".
Once it's fixed, relocatable.ll should gain some tests for aliases, since it looks like it doesn't have any, oops.