[PATCH] D96914: [ELF] Add -z start-stop-gc to let __start_/__stop_ not retain C identifier name sections

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 25 15:49:25 PST 2021


MaskRay added a comment.

In D96914#2581140 <https://reviews.llvm.org/D96914#2581140>, @MaskRay wrote:

> In D96914#2578466 <https://reviews.llvm.org/D96914#2578466>, @theraven wrote:
>
>> Please can you ensure that this is tested with some Objective-C code compiled with `-fobjc-runtime=gnustep-2.0`?  If I am reading the intention correctly, it may result in all of the Objective-C code being dropped from the final link.
>
> I know almost nothing about Objective-C. Can you name the section which could be problematic?
>
>   % clang -ffunction-sections -fobjc-runtime=gnustep-2.0 -isystem /usr/include/GNUstep a.m
>   In file included from a.m:1:
>   /usr/include/GNUstep/Foundation/Foundation.h:31:9: fatal error: 'objc/objc.h' file not found
>   #import <objc/objc.h>
>           ^~~~~~~~~~~~~
>   1 error generated.

Answering this: there are some `llvm.used` usage for ObjC (D97446 <https://reviews.llvm.org/D97446>). D97448 <https://reviews.llvm.org/D97448> will handle them.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96914/new/

https://reviews.llvm.org/D96914



More information about the llvm-commits mailing list