diff mbox series

[Darwin,committed] Update darwin_binds_local_p.

Message ID C4F1DE33-A3AE-440A-8B20-AEE0727AFA97@sandoe.co.uk
State New
Headers show
Series [Darwin,committed] Update darwin_binds_local_p. | expand

Commit Message

Iain Sandoe Oct. 15, 2019, 8:31 p.m. UTC
The use of default_binds_local_p had got out of sync with the varasm
changes, this restores the call to be direct.  In practice, we add some
further tests to determine local binding - but this callback is used for
the initial assessments made by default_encode_section_info().

tested on x86_64-darwin16,
applied to mainline,
thanks
Iain

gcc/ChangeLog:

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

	* config/darwin.c (darwin_binds_local_p): Update to call
	default_binds_local_p_3 () directly. amend comments.
diff mbox series

Patch

diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 1d386e0670..d34b0035bd 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -3049,8 +3049,14 @@  darwin_file_end (void)
 bool
 darwin_binds_local_p (const_tree decl)
 {
-  return default_binds_local_p_1 (decl,
-				  TARGET_KEXTABI && DARWIN_VTABLE_P (decl));
+  /* We use the "shlib" input to indicate that a symbol should be
+     considered overridable; only relevant for vtables in kernel modules
+     on earlier system versions, and with a TODO to complete.  */
+  bool force_overridable = TARGET_KEXTABI && DARWIN_VTABLE_P (decl);
+  return default_binds_local_p_3 (decl, force_overridable /* shlib */,
+				  false /* weak dominate */,
+				  false /* extern_protected_data */,
+				  false /* common_local_p */);
 }
 
 /* The Darwin's implementation of TARGET_ASM_OUTPUT_ANCHOR.  Define the