diff mbox series

[Darwin,machopic,11/n,committed] A flag to indicate synbols should be linker-visible.

Message ID D5E2D84F-F354-4501-AF3A-16D342B1E542@sandoe.co.uk
State New
Headers show
Series [Darwin,machopic,11/n,committed] A flag to indicate synbols should be linker-visible. | expand

Commit Message

Iain Sandoe Nov. 10, 2019, 9:53 p.m. UTC
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.

tested on x86_64-darwin16, applied to mainline.
thanks
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.
diff mbox series

Patch

diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index f331fa1..8eb8edf 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -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}.  */