1// 2// Copyright (C) 2018 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21cc_library_shared { 22 name: "libnative_bridge_vdso", 23 enabled: false, 24 native_bridge_supported: true, 25 target: { 26 native_bridge: { 27 enabled: true, 28 }, 29 }, 30 arch: { 31 arm64: { 32 srcs: ["vdso_arm64.S"], 33 }, 34 riscv64: { 35 srcs: ["vdso_riscv64.S"], 36 }, 37 arm: { 38 srcs: ["vdso_arm.S"], 39 }, 40 }, 41 export_include_dirs: ["include"], 42 // Make sure we do not drag any dependencies for vdso library (-Wl,--exclude-libs,ALL) 43 ldflags: [ 44 "-Wl,--exclude-libs,ALL", 45 "-Wl,-soname,linux-vdso.so.1", 46 47 // TODO(b/146399556): Use -z,separate-code to ensure that each segment's p_offset and 48 // p_vaddr values are equal to work around problems with __libc_init_vdso in Bionic. 49 "-Wl,-z,separate-code", 50 // We need sysv hash style to support vdso-parser: 51 // https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/vDSO/parse_vdso.c 52 "-Wl,--hash-style=both", 53 ], 54 system_shared_libs: [], 55 // Opt out of native_coverage when opting out of system_shared_libs 56 native_coverage: false, 57 nocrt: true, 58 stl: "none", 59 // no_standard_libs: true, 60 strip: { 61 keep_symbols_and_debug_frame: true, 62 }, 63 pack_relocations: false, 64} 65