Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lld/wasm/Writer.cpp | ||
---|---|---|
990 | what if we have TLS in the input but not config->sharedMemory? |
lld/wasm/Writer.cpp | ||
---|---|---|
990 | In this case all the TLS handling is basically internalize. See lld/test/wasm/tls-non-shared-memory.s. I've added an extra case to that test to verify that the imported/GOT usage of the TLS variable is also internalized. |
lld/wasm/SyntheticSections.cpp | ||
---|---|---|
79 | I'm getting ahead of myself here. The TLS flag is needed when exporting (since we need to tell the dynamic linker to adjust the exported value according to the tls base). However for imports we don't need to know if a given global is TLS or not since all the GOT.mem imports are of absolute values (its up to the dynamic linker to ensure they are all absolute addresses). For imports however, we are going to need to tell the dynamic linker about which imports are weak (so it can provide 0 and not error out). I think I will completely remove IMPORT_INFO from this change since its not used yet. |
This change is much more complete now.
- removed ImportInfo for now (will add that later)
- added obj2yaml support for dumping the new subsection
- added a lot more testing
I think the code is looking good.
I do think it will be cleaner in the long run to make the dylink section properly subsectioned, rather than the backwards-compatible version you have here. We've never declared any kind of backwords compat yet for dylibs, have we?
Looks like this change caused llvm/test/ObjectYAML/wasm/dylink_section.yaml to start failing. Working on a fix now.
"toe" => "to"