Add some checks around this combination of flags
Also, honor --global-base when specified in --stack-first mode
rather than ignoring it. But error out if the specified base preseeds
the end of the stack.
Paths
| Differential D136117
[lld][WebAssembly] Don't allow `--global-base` to be specified in -share/-pie or --relocatable modes ClosedPublic Authored by sbc100 on Oct 17 2022, 4:43 PM.
Details Summary Add some checks around this combination of flags Also, honor --global-base when specified in --stack-first mode
Diff Detail
Event Timeline
This revision is now accepted and ready to land.Oct 18 2022, 4:52 PM This revision was landed with ongoing or failed builds.Oct 18 2022, 5:20 PM Closed by commit rG6912ed7b8fe6: [lld][WebAssembly] Don't allow `--global-base` to be specified in -share/-pie… (authored by sbc100). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 468710 lld/test/wasm/global-base.test
lld/wasm/Driver.cpp
lld/wasm/Writer.cpp
|
Could you add a comment here explaining why this is 1024? I think it's to avoid putting any global at address 0 which C/C++ would consider to be a null pointer, and 1024 is a nice round (in binary) number. Is there any other consideration here?