summaryrefslogtreecommitdiff
path: root/test/lit/binary/dylink.test
blob: 72341c9bacf205728d494e506ebdfe3fbfa73c86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Verify that extra bytes in the dylink section are preserved.
#
# `dylink.test.wasm` was generated using emscripten to build a side
# module with two TLS exports (which adds extra information to the
# dylink section) using:
#  `emcc -s SIDE_MODULE side.c`
#
# side.c:
#   _Thread_local int foo = 10;
#   _Thread_local int bar = 11;
#
# and then removing all sections except the dylink section using:
#  `llvm-objcopy --only-section=dylink`
RUN: wasm-opt -O1 %s.wasm -o %t.o
RUN: cmp %s.wasm %t.o