[lld-macho] Print archive names in linker map
authorJez Ng <jezng@fb.com>
Sat, 11 Mar 2023 03:29:14 +0000 (22:29 -0500)
committerJez Ng <jezng@fb.com>
Sat, 11 Mar 2023 06:40:14 +0000 (01:40 -0500)
commit5b21395cc2422d735c632afefcb95f08d8ed4b88
tree98f0849a8a9e504272e1edf74656c4bbe2777f42
parentbb69a66ced27918f894fb0d5e58e22fda6958d99
[lld-macho] Print archive names in linker map

If a symbol is pulled in from an archive, we should include the archive
name in the map file output. This is what ld64 does.

Note that we aren't using `toString(InputFile*)` here because it
includes the install name for dylibs in its output, and ld64's map file
does not contain those.

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D145623
lld/MachO/MapFile.cpp
lld/test/MachO/map-file.ll
lld/test/MachO/map-file.s