[lld] [LLD][ELF] add bp-* options in ELF (PR #120514)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 18 19:41:52 PST 2024
Colibrow wrote:
@MaskRay @ellishg
Hi, here is the ELF patch that adds support for the bp-* options. Could you please review it?
I also tested the ld64.lld build on my Mac locally using the --bp-compression-sort=function option to compare the effect of relocation hashes. Below are the results:
| file | size | gzipped size |
|------------|---------|---------|
| lld | 411,461,872 | 66,160,343 |
| lld-no-reloc | 411,426,304 | 65,935,315 |
In the lld-no-reloc version, I removed the following code responsible for calculating relocation hashes:
https://github.com/llvm/llvm-project/blob/1cc926b8b6976ac4a5a411eae564cfde2df1ef9d/lld/MachO/BPSectionOrderer.h#L104-L115
The results show that removing relocation hashes reduces the file size and gzip-compressed size slightly. I’m concerned that something might be wrong here—do you have any insights or thoughts on this?
https://github.com/llvm/llvm-project/pull/120514
More information about the llvm-commits
mailing list