Roger Kim
f84023a812
[lld][macho] Stop grouping symbols by sections in mapfile.
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
2022-01-20 12:16:37 -08:00
..
2021-09-16 17:55:32 -07:00
2021-11-19 09:23:19 -05:00
2021-06-22 06:12:42 -04:00
2021-04-08 12:21:01 -04:00
2021-04-08 14:12:55 -04:00
2021-09-16 17:55:32 -07:00
2021-05-10 15:45:54 -04:00
2021-07-27 14:39:43 -04:00
2021-07-06 00:25:18 -04:00
2020-09-25 11:28:36 -07:00
2022-01-19 13:12:18 -08:00
2021-05-04 09:56:07 -07:00
2021-04-15 21:16:33 -04:00
2021-05-04 09:56:07 -07:00
2021-04-11 23:25:23 -04:00
2021-05-04 09:56:07 -07:00
2021-04-11 23:25:23 -04:00
2021-04-07 12:08:12 -04:00
2021-08-30 22:09:05 -04:00
2021-08-27 23:27:45 -04:00
2021-05-05 14:41:01 -04:00
2021-07-21 12:51:53 -07:00
2021-04-20 16:58:57 -04:00
2021-04-20 16:58:57 -04:00
2021-10-26 11:38:01 -04:00
2021-05-09 20:30:26 -04:00
2021-07-01 21:22:38 -04:00
2022-01-12 10:47:04 -05:00
2022-01-12 10:47:04 -05:00
2022-01-12 10:47:04 -05:00
2021-10-31 16:31:21 -07:00
2021-07-29 11:07:50 -04:00
2021-07-23 11:49:00 -04:00
2021-10-26 16:04:15 -04:00
2021-04-23 09:25:08 -04:00
2021-06-27 06:49:32 -04:00
2021-11-12 16:02:49 -05:00
2021-11-10 19:31:54 -05:00
2021-06-07 23:48:35 -04:00
2021-06-18 13:01:42 -04:00
2021-06-28 22:26:43 -04:00
2021-06-07 13:44:58 -04:00
2022-01-06 09:45:44 -05:00
2020-12-17 17:40:50 -08:00
2021-05-10 15:45:54 -04:00
2021-08-16 19:41:12 -07:00
2021-10-31 16:31:21 -07:00
2021-06-28 14:25:22 +07:00
2021-07-11 13:37:48 -04:00
2021-07-26 09:04:51 -07:00
2020-12-15 19:23:07 -05:00
2020-09-25 11:28:36 -07:00
2021-07-12 11:13:54 -04:00
2020-12-15 19:34:59 -05:00
2021-04-21 14:21:42 -04:00
2021-05-10 15:45:54 -04:00
2021-11-01 14:26:54 -07:00
2021-11-12 21:57:30 -05:00
2021-04-23 09:25:08 -04:00
2020-09-25 11:28:36 -07:00
2020-12-03 21:23:47 -05:00
2020-12-21 14:44:08 -05:00
2021-07-05 20:06:26 -04:00
2021-06-03 21:00:35 -04:00
2021-06-07 23:48:35 -04:00
2021-06-18 22:43:50 -04:00
2021-06-09 20:39:39 -04:00
2021-06-18 13:01:42 -04:00
2021-04-30 16:17:25 -04:00
2021-06-14 19:21:59 -07:00
2021-10-27 14:02:07 -04:00
2021-10-30 18:58:59 -04:00
2021-09-29 08:25:21 -04:00
2022-01-06 09:45:44 -05:00
2021-11-12 16:02:49 -05:00
2021-06-09 20:39:39 -04:00
2021-10-15 13:24:47 -04:00
2021-11-17 16:18:14 -08:00
2021-04-21 05:41:14 -07:00
2021-10-29 11:00:28 -04:00
2021-06-06 20:01:50 -04:00
2021-06-09 20:36:07 -04:00
2021-06-06 20:19:50 -04:00
2021-06-07 06:22:52 -04:00
2021-09-14 15:26:45 -04:00
2021-11-04 00:02:03 -04:00
2021-04-23 09:25:08 -04:00
2022-01-18 15:42:59 -08:00
2021-07-19 15:04:32 -04:00
2020-12-03 21:23:47 -05:00
2021-06-14 19:21:59 -07:00
2021-06-18 16:36:14 -04:00
2021-12-07 19:11:23 -05:00
2021-07-23 10:40:22 -04:00
2021-12-04 22:25:49 -05:00
2021-07-15 12:56:13 -04:00
2021-07-06 15:23:42 -04:00
2021-07-29 11:07:50 -04:00
2021-07-29 11:07:50 -04:00
2021-07-06 15:23:42 -04:00
2021-11-04 00:02:03 -04:00
2021-09-04 17:40:07 -04:00
2021-07-06 15:23:42 -04:00
2021-07-06 15:23:42 -04:00
2021-07-06 15:23:42 -04:00
2021-07-06 15:23:42 -04:00
2021-04-23 09:25:08 -04:00
2021-07-19 16:45:33 -04:00
2021-04-23 09:25:08 -04:00
2021-07-23 11:49:00 -04:00
2021-12-17 15:26:35 -05:00
2022-01-20 12:16:37 -08:00
2021-03-10 08:57:46 -05:00
2021-11-04 00:02:03 -04:00
2021-11-04 00:02:03 -04:00
2020-09-25 11:28:36 -07:00
2021-10-27 14:58:42 -04:00
2021-05-08 17:36:30 -07:00
2021-07-07 13:15:55 -04:00
2022-01-19 10:14:49 -08:00
2022-01-19 10:14:49 -08:00
2021-07-23 11:33:23 -04:00
2020-12-23 11:24:12 -05:00
2021-05-08 17:36:30 -07:00
2020-12-10 15:57:52 -08:00
2021-05-17 14:22:12 -04:00
2021-04-20 16:58:57 -04:00
2021-07-25 18:20:09 -04:00
2020-12-02 09:48:31 -05:00
2021-04-30 14:23:35 +02:00
2021-05-05 14:41:01 -04:00
2020-12-21 14:44:08 -05:00
2020-11-30 08:23:58 -05:00
2021-06-07 06:22:52 -04:00
2021-10-31 16:31:21 -07:00
2021-11-03 12:01:36 -07:00
2021-05-11 13:31:32 -04:00
2021-06-02 11:09:26 -04:00
2021-04-20 16:58:57 -04:00
2020-12-21 14:44:08 -05:00
2021-05-25 14:58:29 -04:00
2021-04-20 16:58:57 -04:00
2021-03-29 14:08:12 -04:00
2022-01-18 15:42:59 -08:00
2021-04-20 19:54:53 -04:00
2021-12-17 16:40:07 -05:00
2021-06-07 17:04:03 -04:00
2021-06-05 01:27:42 -07:00
2021-11-12 11:29:08 -08:00
2022-01-06 09:45:44 -05:00
2022-01-19 10:14:49 -08:00
2021-06-28 14:25:22 +07:00
2021-07-27 14:28:52 -04:00
2020-12-21 14:44:08 -05:00
2020-12-21 14:44:08 -05:00
2021-05-18 13:53:55 -04:00
2021-11-02 13:59:14 -04:00
2021-05-10 15:45:54 -04:00
2021-04-06 15:10:00 -04:00
2021-04-22 19:35:32 -04:00
2021-06-28 14:25:22 +07:00
2021-08-26 18:52:07 -04:00
2021-04-08 12:21:01 -04:00
2021-03-26 18:14:10 -04:00
2021-03-25 14:51:31 -04:00
2021-11-01 14:26:54 -07:00
2021-06-28 18:41:33 -04:00
2021-12-28 19:03:13 -05:00
2021-10-25 22:10:24 -04:00
2021-05-10 15:45:54 -04:00
2021-05-28 15:15:59 -07:00
2021-07-05 20:06:25 -04:00
2021-07-05 03:40:54 -04:00
2021-06-28 14:25:22 +07:00
2021-04-22 22:51:34 -04:00
2021-04-30 16:17:26 -04:00
2022-01-19 10:14:49 -08:00
2021-11-12 15:01:51 -05:00
2021-07-19 16:37:41 -04:00
2021-04-30 09:37:02 -04:00
2021-04-30 09:37:02 -04:00
2020-12-21 14:44:08 -05:00
2021-05-08 17:36:30 -07:00
2021-11-30 09:54:59 -05:00
2021-04-22 22:42:48 -04:00
2021-04-11 23:25:23 -04:00
2021-05-10 15:45:54 -04:00
2021-06-28 14:25:22 +07:00
2021-06-28 14:25:22 +07:00
2021-04-29 15:11:23 -04:00
2021-06-07 23:48:35 -04:00
2021-05-10 09:16:18 -07:00
2021-07-26 09:04:51 -07:00