diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2023-10-05 10:43:58 +0000 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2023-10-05 10:43:58 +0000 |
commit | e41790103f8e015e94e4d323320b0bce53c1234e (patch) | |
tree | bf4dc9ef480d4935cce7e6369ce6d15e174470e6 | |
parent | b5548f41870c7f4360dc49ed3a8a1e7dd7200faf (diff) | |
download | efilite-e41790103f8e015e94e4d323320b0bce53c1234e.tar.gz |
Really use LLD
-rw-r--r-- | .cargo/config | 9 | ||||
-rw-r--r-- | src/efilite.lds | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/.cargo/config b/.cargo/config index 8d15407..79afed7 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,11 +1,10 @@ [target.aarch64-unknown-linux-gnu] rustflags = [ "-C", "relocation-model=static", - "-C", "link-arg=-Wl,-Tsrc/efilite.lds,--orphan-handling=error", - "-C", "link-arg=-nostartfiles", - "-C", "link-arg=--target=aarch64-linux-gnu", - "-C", "target-feature=+crc,+rand,+bti"] -linker = "clang" + "-C", "linker-flavor=ld.lld", + "-C", "link-arg=-Tsrc/efilite.lds", + "-C", "link-arg=--orphan-handling=error", + "-C", "target-feature=+crc,+rand,+bti,-outline-atomics"] [build] target = "aarch64-unknown-linux-gnu" diff --git a/src/efilite.lds b/src/efilite.lds index 2c1a562..dd1295d 100644 --- a/src/efilite.lds +++ b/src/efilite.lds @@ -105,8 +105,11 @@ SECTIONS .debug_frame 0 : { *(.debug_frame) } .debug_loc 0 : { *(.debug_loc) } + .shstrtab 0 : { *(.shstrtab) } + /DISCARD/ : { *(.note* .comment* .rela.* .eh_frame_hdr .eh_frame) + *(.interp .symtab .strtab) } } ASSERT(SIZEOF(.rtsdata) != 0x10000, ".rtsdata section too big") |