[lld-macho]Use install_name as Identifier for code-sign, if available.
authorVy Nguyen <vyng@google.com>
Mon, 17 Jul 2023 19:37:51 +0000 (15:37 -0400)
committerVy Nguyen <vyng@google.com>
Wed, 19 Jul 2023 18:19:15 +0000 (14:19 -0400)
commit642ffbbf38bbe996a7934b3e607ca08151c76163
treedd8de37bb19b3968974eaeffda2c87caca74cdbb
parenta37d7472225442227c531ce85a7448499f70b72e
[lld-macho]Use install_name  as Identifier for code-sign, if available.

Detail:
LD64 uses the name provided via  -[dylib]install_name as "Identifier", when available.
For compatiblity, LLD should do that too.

Differential Revision: https://reviews.llvm.org/D155508
lld/MachO/SyntheticSections.cpp
lld/test/MachO/adhoc-codesign.s