llvm-project/lld/wasm
Sam Clegg 1bb79875e4 [lld][WebAssembly] Set memory limits correctly for PIC + shared memory
Don't early return from layoutMemory in PIC mode before we have set the
memory limits.

This matters in particular with shared-memory + PIC because shared
memories require maximum size.

Secondly, when we need a maximum, but the user does not supply one,
default to MAX_INT rather than 0 (defaulting to zero is completely
useless and means that building with -shared didn't previously work at
all without --maximum-memory, because zero is never big enough).

This is part of an ongoing effort to enable dynamic linking with
threads in emscripten.

See https://github.com/emscripten-core/emscripten/issues/3494

Differential Revision: https://reviews.llvm.org/D92528
2020-12-03 18:14:28 -08:00
..
CMakeLists.txt [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
Config.h [LTO][wasm][NewPM] Allow using new pass manager for wasm LTO 2020-12-01 12:22:40 -08:00
Driver.cpp [WebAssembly] Rename --lto-no-new-pass-manager to --no-lto-new-pass-manager 2020-12-01 16:52:37 -08:00
InputChunks.cpp [lld] Use -1 as tombstone value for discarded code ranges 2020-12-01 17:06:32 -08:00
InputChunks.h [lld] Use -1 as tombstone value for discarded code ranges 2020-12-01 17:06:32 -08:00
InputEvent.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
InputFiles.cpp [lld] Use -1 as tombstone value for discarded code ranges 2020-12-01 17:06:32 -08:00
InputFiles.h [lld] Use -1 as tombstone value for discarded code ranges 2020-12-01 17:06:32 -08:00
InputGlobal.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
LTO.cpp [LTO][wasm][NewPM] Allow using new pass manager for wasm LTO 2020-12-01 12:22:40 -08:00
LTO.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
MapFile.cpp [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
MapFile.h [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
MarkLive.cpp [lld][WebAssembly] Fix malformed output with -pie + --shared-memory 2020-12-03 11:06:07 -08:00
MarkLive.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Options.td [WebAssembly] Rename --lto-no-new-pass-manager to --no-lto-new-pass-manager 2020-12-01 16:52:37 -08:00
OutputSections.cpp [lld][WebAssembly] Fix malformed output with -pie + --shared-memory 2020-12-03 11:06:07 -08:00
OutputSections.h [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
OutputSegment.h [WebAssembly] wasm64: fix memory.init operand types 2020-08-10 10:15:20 -07:00
Relocations.cpp [lld][WebAssembly] Ensure stub symbols always get address 0 2020-11-25 18:26:34 -08:00
Relocations.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
SymbolTable.cpp [lld][WebAssembly] Ensure stub symbols always get address 0 2020-11-25 18:26:34 -08:00
SymbolTable.h [lld][WebAssembly] Implement --unresolved-symbols 2020-11-17 16:27:06 -08:00
Symbols.cpp [lld][WebAssembly] Implement --unresolved-symbols 2020-11-17 16:27:06 -08:00
Symbols.h [lld][WebAssembly] Feedback from D92038. NFC 2020-12-01 14:53:59 -08:00
SyntheticSections.cpp [lld][WebAssembly] Ensure stub symbols always get address 0 2020-11-25 18:26:34 -08:00
SyntheticSections.h [WebAssembly] Add support for named globals in the object format. 2020-11-19 00:17:22 -08:00
Writer.cpp [lld][WebAssembly] Set memory limits correctly for PIC + shared memory 2020-12-03 18:14:28 -08:00
Writer.h [WebAssembly] Refactor synthetic sections and relocation processing. NFC. 2019-05-21 09:13:09 +00:00
WriterUtils.cpp [WebAssembly] Fixed Writer::createInitMemoryFunction to work for wasm64 2020-12-03 16:20:55 -08:00
WriterUtils.h [WebAssembly] Fixed Writer::createInitMemoryFunction to work for wasm64 2020-12-03 16:20:55 -08:00