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: unassignedb...@nondot.org
          Reporter: keithbsmi...@gmail.com
                CC: g...@fb.com, jezr...@gmail.com,
                    llvm-bugs@lists.llvm.org, smee...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to