[PATCH] D40716: Fix Wasm symbol name collisions
Nicholas Wilson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 1 04:57:19 PST 2017
ncw created this revision.
Herald added subscribers: llvm-commits, sunfish, aheejin, jfb.
If you link in two object files with duplicate local symbol names, the link should succeed - but the "names" section is populated with duplicate names. According to binaryen, this is invalid and wasm-dis will fail.
When linking ELF files, the symbol names are "budged" to avoid the collision in the final symbol table.
I've added budging and a test for the Wasm name table.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D40716
Files:
test/wasm/Inputs/local1.ll
test/wasm/Inputs/local2.ll
test/wasm/duplicate-static.ll
wasm/Writer.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40716.125111.patch
Type: text/x-patch
Size: 3333 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171201/81b66494/attachment-0001.bin>
More information about the llvm-commits
mailing list