[WebAssembly] fix bug in finding .tdata segment
authorGuanzhong Chen <gzchen@google.com>
Thu, 18 Jul 2019 21:18:24 +0000 (21:18 +0000)
committerGuanzhong Chen <gzchen@google.com>
Thu, 18 Jul 2019 21:18:24 +0000 (21:18 +0000)
commit21aafc2e0c5c354362d7e6aae6afca6ac9927601
tree618c359d9c3377e243d45884cb8e99dd0f9a40b3
parentdf4479200b399a8bc4054ab44cfb40a2a6e44bd8
[WebAssembly] fix bug in finding .tdata segment

Summary: Fix bug in `wasm-ld`'s `Writer::createInitTLSFunction` that only finds `.tdata` if it's the first section.

Reviewers: tlively, aheejin, sbc100

Reviewed By: sbc100

Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64947

llvm-svn: 366500
lld/test/wasm/tls.ll
lld/wasm/Writer.cpp