blob: bfb0886079e8e8dfd7e3fe23a3e25c48078010e7 [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
source_set("ldso") {
deps = [
":dlstart",
"$zx/system/ulib/ldmsg",
"$zx/third_party/ulib/musl:musl_internal",
]
sources = [
"$zx/third_party/ulib/musl/arch/${toolchain.cpu}/dl-entry.S",
"dynlink-sancov.S",
"dynlink.c",
]
# This is needed by dynlink-sancov.S and dynlink.c for "sancov-stubs.h".
include_dirs = [ "$zx/system/ulib/c/sanitizers" ]
if (toolchain.libprefix != "") {
# The libprefix always ends with a / but that's not part of the
# "config" string in the loader-service protocol.
ldsvc_config = get_path_info("${toolchain.libprefix}libfoo.so", "dir")
assert(ldsvc_config != "" && ldsvc_config != ".")
defines = [ "DYNLINK_LDSVC_CONFIG=\"$ldsvc_config\"" ]
}
}
source_set("dlstart") {
visibility = [ ":*" ]
deps = [
"$zx/third_party/ulib/musl:musl_internal",
]
sources = [
"dlstart.c",
]
configs += [ "$zx/public/gn/config:no_sanitizers" ]
}