[llvm-bugs] [Bug 52398] New: lld/mac category behavior doesn't match ld64
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Nov 3 22:06:16 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=52398
Bug ID: 52398
Summary: lld/mac category behavior doesn't match ld64
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: MachO
Assignee: unassignedbugs at nondot.org
Reporter: keithbsmiley at gmail.com
CC: gkm at fb.com, jezreel at gmail.com,
llvm-bugs at lists.llvm.org, smeenai at fb.com
With this Objective-C code:
```
#import <Foundation/Foundation.h>
@interface NSArray (first)
- (void)firstMethod;
@end
@implementation NSArray (first)
- (void)firstMethod {}
@end
@interface NSArray (second)
- (void)secondMethod;
@end
@implementation NSArray (second)
- (void)secondMethod {}
@end
int main() {
return 0;
}
```
The produced binary has significantly different symbols than ld64:
```
--- ld64
+++ lld
@@ -1,7 +1,10 @@
-[NSArray(first) firstMethod]
-[NSArray(second) secondMethod]
_OBJC_CLASS_$_NSArray
+__OBJC_$_CATEGORY_INSTANCE_METHODS_NSArray_$_first
+__OBJC_$_CATEGORY_INSTANCE_METHODS_NSArray_$_second
__OBJC_$_CATEGORY_NSArray_$_first
-__OBJC_$_INSTANCE_METHODS_NSArray(first|second)
+__OBJC_$_CATEGORY_NSArray_$_second
__mh_execute_header
_main
+dyld_stub_binder
```
It's unclear to me if differences like this will be a major issue, but I assume
we're hoping to match ld64 more closely than this?
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211104/cebeeeac/attachment.html>
More information about the llvm-bugs
mailing list