forked from OSchip/llvm-project
f84023a812
As per [Bug 50689](https://bugs.llvm.org/show_bug.cgi?id=50689), ``` 2. getSectionSyms() puts all the symbols into a map of section -> symbols, but this seems unnecessary. This was likely copied from the ELF port, which prints a section header before the list of symbols it contains. But the Mach-O map file doesn't print these headers. ``` This diff removes `getSectionSyms()` and keeps all symbols in a flat vector. What does ld64's mapfile look like? ``` $ llvm-mc -filetype=obj -triple=x86_64-apple-darwin test.s -o test.o $ llvm-mc -filetype=obj -triple=x86_64-apple-darwin foo.s -o foo.o $ ld -map map test.o foo.o -o out -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lSystem ``` ``` [ 0] linker synthesized [ 1] test.o [ 2] foo.o 0x100003FB7 0x00000001 __TEXT __text 0x100003FB8 0x00000000 __TEXT obj 0x100003FB8 0x00000048 __TEXT __unwind_info 0x100004000 0x00000001 __DATA __common 0x100003FB7 0x00000001 [ 1] _main 0x100003FB8 0x00000000 [ 2] _foo 0x100003FB8 0x00000048 [ 0] compact unwind info 0x100004000 0x00000001 [ 1] _number ``` Perf numbers when linking chromium framework on a 16-Core Intel Xeon W Mac Pro: ``` base diff difference (95% CI) sys_time 1.406 ± 0.020 1.388 ± 0.019 [ -1.9% .. -0.6%] user_time 5.557 ± 0.023 5.914 ± 0.020 [ +6.2% .. +6.6%] wall_time 4.455 ± 0.041 4.436 ± 0.035 [ -0.8% .. -0.0%] samples 35 35 ``` Reviewed By: #lld-macho, int3 Differential Revision: https://reviews.llvm.org/D114735 |
||
---|---|---|
.. | ||
COFF | ||
Common | ||
ELF | ||
MachO | ||
MinGW | ||
cmake/modules | ||
docs | ||
include/lld | ||
test | ||
tools/lld | ||
utils | ||
wasm | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
CMakeLists.txt | ||
CODE_OWNERS.TXT | ||
LICENSE.TXT | ||
README.md |
README.md
LLVM Linker (lld)
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.
Benchmarking
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
.