[PATCH] D65893: [llvm-objcopy] Allow the visibility of the start, end and size symbols created by --binary to be specified with --binary-symbol-visibility

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 8 03:34:42 PDT 2019


MaskRay added a comment.

Quote gABI:

> Second, if any reference to or definition of a name is a symbol with a non-default visibility attribute, the visibility attribute must be propagated to the resolving symbol in the linked object. If different visibility attributes are specified for distinct references to or definitions of a symbol, the most constraining visibility attribute must be propagated to the resolving symbol in the linked object. The attributes, ordered from least to most constraining, are: STV_PROTECTED, STV_HIDDEN and STV_INTERNAL.

You can achieve the same with: `__attribute__((visibility("hidden"))) extern char _binary_a_start[];` So I'm not sure why another option is needed (I think my another concern is that the option name `--binary-symbol-visibility` can make people puzzled if they add/delete/change symbols). See D55682 <https://reviews.llvm.org/D55682>.


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

https://reviews.llvm.org/D65893





More information about the llvm-commits mailing list