[Darwin, machopic 11/n] A flag to indicate synbols should be linker-visible.
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 10 Nov 2019 21:48:27 +0000 (21:48 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Sun, 10 Nov 2019 21:48:27 +0000 (21:48 +0000)
Some of the solution to PR71767 is incomplete, and we need finer-grained
control over whether symbols need to be made linker-visible.  This is a
preparation patch, providing the flag.

gcc/ChangeLog:

2019-11-10  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.h (MACHO_SYMBOL_FLAG_LINKER_VIS): New.
(MACHO_SYMBOL_LINKER_VIS_P): New.

From-SVN: r278028

gcc/ChangeLog
gcc/config/darwin.h

index 8b7ed6358c33f09712109494efb98c0a25f1b3db..c914ab4f4f8ee03d59cea73bbe6ce37501485bdd 100644 (file)
@@ -1,3 +1,8 @@
+2019-11-10  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * config/darwin.h (MACHO_SYMBOL_FLAG_LINKER_VIS): New.
+       (MACHO_SYMBOL_LINKER_VIS_P): New.
+
 2019-11-10  Kwok Cheung Yeung  <kcy@codesourcery.com>
 
        * lra-spills.c (assign_spill_hard_regs): Do not spill into
index f331fa1aa89f9742debee4d76678de7d82dead51..8eb8edf326f96d322ff4521b7dfd43980f159e23 100644 (file)
@@ -843,6 +843,13 @@ extern GTY(()) section * darwin_sections[NUM_DARWIN_SECTIONS];
 #define MACHO_SYMBOL_HIDDEN_VIS_P(RTX) \
   ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_HIDDEN_VIS) != 0)
 
+/* Set on a symbol that should be made visible to the linker (overriding
+   'L' symbol prefixes).  */
+
+#define MACHO_SYMBOL_FLAG_LINKER_VIS ((SYMBOL_FLAG_SUBT_DEP) << 4)
+#define MACHO_SYMBOL_LINKER_VIS_P(RTX) \
+  ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_LINKER_VIS) != 0)
+
 /* Set on a symbol that is a pic stub or symbol indirection (i.e. the
    L_xxxxx${stub,non_lazy_ptr,lazy_ptr}.  */