commit | ea1e73452d8258a8de2dbbfe0f8210fa31fb4b56 | [log] [tgz] |
---|---|---|
author | Fangrui Song <i@maskray.me> | Tue Jan 23 11:38:15 2024 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Jan 23 11:39:56 2024 -0800 |
tree | 00aecfa4e065a5bc728b30baa2be51301ed38010 | |
parent | 79d34bb7a877627c478e3b2f7c20142ba1af0539 [diff] |
[ELF] --save-temps --lto-emit-asm: derive ELF/asm file names from bitcode file names Port COFF's https://reviews.llvm.org/D78221 and https://reviews.llvm.org/D137217 to ELF. For the in-process ThinLTO link, `ld.lld --save-temps a.o d/b.o -o out` will create ELF relocatable files `out.lto.a.o`/`d/out.lto.b.o` instead of `out1.lto.o`/`out2.lto.o`. Deriving the LTO-generated relocatable file name from bitcode file names helps debugging. The relocatable file name from the first regular LTO partition does not change: `out.lto.o`. The second, if present due to `--lto-partition=`, changes from `out1.lto.o` to `lto.1.o`. For an archive member, e.g. `d/a.a(coll.o at 8)`, the relocatable file is `d/out.lto.a.a(coll.o at 8).o`. `--lto-emit-asm` file names are changed similarly. `--lto-emit-asm -o out` now creates `out.lto.s` instead of `out`, therefore the `--lto-emit-asm -o -` idiom no longer works. However, I think this new behavior (which matches COFF) is better since keeping or removing `--lto-emit-asm` will dump different files, instead of overwriting the `-o` output file from an executable/shared object to an assembly file. Reviewers: rnk, igorkudrin, xur-llvm, teresajohnson, ZequanWu Reviewed By: teresajohnson Pull Request: https://github.com/llvm/llvm-project/pull/78835 GitOrigin-RevId: f7669ba3d9443bc95dd63fa25beea13e6265fdc5
This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.
lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.
In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.
It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz
The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f
.