]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Darwin] Update darwin_binds_local_p.
authoriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 Oct 2019 20:15:38 +0000 (20:15 +0000)
committeriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 Oct 2019 20:15:38 +0000 (20:15 +0000)
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().

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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@277009 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/darwin.c

index 023b8f2524c28305a9771bef49e6078a300b4055..6a9c2e0482fc00f21d0c80bcacbd70b96e76ca55 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2019-10-15  Richard Biener  <rguenther@suse.de>
 
        * lto-streamer-out.c (lto_variably_modified_type_p): New.
index 1d386e06703fac2e1f053b3bb94f17d861c1160c..d34b0035bdbaaf9b97b6dcc511dbf8a725792f2a 100644 (file)
@@ -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