fuzzing: centipede: add support for multi-dso

This leverages multi-dso support implemented in centipede. Dynamic
linker can now link against main executable sancov functions.

Bug: 1472709
Change-Id: I0c6de3d6b656475998472354ec389358b5441a12
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4834489
Reviewed-by: Adrian Taylor <adetaylor@chromium.org>
Commit-Queue: Paul Semel <paulsemel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1192089}
NOKEYCHECK=True
GitOrigin-RevId: 1c06f4f40fa6b96ebd3cb71a4f02e531dcfa1b86
diff --git a/BUILD.gn b/BUILD.gn
index 7f21a59..3e39647 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -66,6 +66,11 @@
   configs += [ ":centipede_internal_config" ]
   configs -= fuzzing_engine_remove_configs
   configs += fuzzing_engine_add_configs
+
+  # sancov symbols need to be exported for centipede to work correctly with
+  # multi-dso.
+  configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
+  configs += [ "//build/config/gcc:symbol_visibility_default" ]
 }
 
 config("centipede_internal_config") {