llvm-project/lld/test/wasm/Inputs
Ayke van Laethem 13ca0c87ed
[lld][WebAssembly] Align __heap_base
__heap_base was not aligned. In practice, it will often be aligned
simply because it follows the stack, but when the stack is placed at the
beginning (with the --stack-first option), the __heap_base might be
unaligned. It could even be byte-aligned.

At least wasi-libc appears to expect that __heap_base is aligned:
659ff41456/dlmalloc/src/malloc.c (L5224)

While WebAssembly itself does not appear to require any alignment for
memory accesses, it is sometimes required when sharing a pointer
externally. For example, WASI might expect alignment up to 8:
https://github.com/WebAssembly/WASI/blob/main/phases/snapshot/docs.md#-timestamp-u64

This issue got introduced with the addition of the --stack-first flag:
https://reviews.llvm.org/D46141
I suspect the lack of alignment wasn't intentional here.

Differential Revision: https://reviews.llvm.org/D106499
2021-07-24 14:03:26 +02:00
..
archive1.ll
archive2.ll
archive3.ll
call-indirect.s [WebAssembly][lld] Fix call-indirect.s test to validate 2021-01-19 16:12:38 +01:00
call-ret32.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
comdat-data.s [lld][WebAssembly] Do not merge comdat data segments 2021-05-03 16:43:29 -07:00
comdat1.ll
comdat1.s [WebAssembly][lld] Exclude COMDAT sections 2020-12-10 17:47:41 -08:00
comdat2.ll
comdat2.s [WebAssembly][lld] Exclude COMDAT sections 2020-12-10 17:47:41 -08:00
ctor-ctor.s [WebAssembly] GC constructor functions in otherwise unused archive objects 2020-10-12 18:54:57 -07:00
ctor-lib.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
ctor-setup-call-def.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
ctor-setup.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
ctor-start.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
custom.ll
debuginfo1.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
debuginfo2.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
disallow-feature-foo.yaml
explicit-section.ll
global-ctor-dtor.ll
globals.yaml [WebAssembly] Allow multivalue signatures in object files 2019-10-18 20:27:30 +00:00
hello.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
hidden.s [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
import-attributes.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
locals-duplicate1.ll
locals-duplicate2.ll
many-funcs.ll
merge-string-debug2.s [lld][WebAssembly] Enable string tail merging in debug sections 2021-05-18 12:25:39 -07:00
no-feature-foo.yaml
optional-symbol.s [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
require-feature-foo.yaml
ret32.s [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
ret64.s [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
sig_mismatch.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
stack-first.s [lld][WebAssembly] Align __heap_base 2021-07-24 14:03:26 +02:00
start.s [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
strong-symbol.s [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
tag-section1.ll [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
tag-section2.ll [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
undefined-globals.s [WebAssembly] Added initial type checker to MC Assembler 2021-07-09 14:07:25 -07:00
use-feature-foo.yaml
weak-alias.ll
weak-symbol1.s [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
weak-symbol2.s [lld][WebAssembly] Convert some lld tests to assembly 2020-05-28 16:52:01 -07:00
weak-undefined.s [lld][WebAssembly] Handle mixed strong and weak undefined symbols 2020-02-28 10:16:10 -08:00