diff --git a/build.rs b/build.rs index d39f0124..b9cbe519 100644 --- a/build.rs +++ b/build.rs @@ -1,3 +1,9 @@ fn main() { + // Support for fixed-address compilation. libtock_build_scripts::auto_layout(); + + // Configure the alignment size for the linker. This prevents the linker + // from assuming very large pages (i.e. 65536 bytes) and unnecessarily + // inserting additional padding into the output ELF. + println!("cargo:rustc-link-arg=-zmax-page-size=4096"); }