diff --git a/compiler/build/src/link.rs b/compiler/build/src/link.rs index 528cb208a5..40a8f84cbf 100644 --- a/compiler/build/src/link.rs +++ b/compiler/build/src/link.rs @@ -275,6 +275,7 @@ pub fn build_c_host_native( command.args(&[ shared_lib_path.to_str().unwrap(), "-fPIE", + "-pie", "-lm", "-lpthread", "-ldl", diff --git a/linker/README.md b/linker/README.md index 24ee2a3f61..0d1e2d77ee 100644 --- a/linker/README.md +++ b/linker/README.md @@ -33,7 +33,6 @@ This linker is run in 2 phases: preprocessing and surigical linking. - Run CLI tests and/or benchmarks with the Roc Linker. - Test with an executable completely generated by Cargo (It will hopefully work out of the box like zig). -- Investigate why C is using absolute jumps to the main function from `_start`. This means our shifts break the executable. - Add Macho support - Honestly should be almost exactly the same code. This means we likely need to do a lot of refactoring to minimize the duplicate code.