2015-09-17 01:33:27 +02:00
|
|
|
//
|
|
|
|
// libdl
|
|
|
|
//
|
2017-10-05 17:23:10 +02:00
|
|
|
cc_library_static {
|
|
|
|
name: "libdl_static",
|
2018-10-12 08:32:26 +02:00
|
|
|
defaults: ["linux_bionic_supported"],
|
2018-04-27 14:53:11 +02:00
|
|
|
recovery_available: true,
|
2017-10-05 17:23:10 +02:00
|
|
|
|
2018-02-06 02:30:57 +01:00
|
|
|
srcs: [
|
|
|
|
"libdl.cpp",
|
|
|
|
"libdl_cfi.cpp",
|
|
|
|
],
|
2017-10-05 17:23:10 +02:00
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Wextra",
|
|
|
|
"-Wunused",
|
|
|
|
"-Werror",
|
|
|
|
],
|
|
|
|
|
|
|
|
// For private/CFIShadow.h.
|
|
|
|
include_dirs: ["bionic/libc"],
|
|
|
|
|
|
|
|
stl: "none",
|
2018-12-03 22:57:20 +01:00
|
|
|
system_shared_libs: [],
|
2017-10-05 17:23:10 +02:00
|
|
|
|
|
|
|
sanitize: {
|
|
|
|
never: true,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2015-09-17 01:33:27 +02:00
|
|
|
cc_library {
|
2016-11-29 02:02:25 +01:00
|
|
|
name: "libdl",
|
2018-04-27 14:53:11 +02:00
|
|
|
recovery_available: true,
|
2017-10-27 20:21:20 +02:00
|
|
|
static_ndk_lib: true,
|
2016-11-29 02:02:25 +01:00
|
|
|
|
|
|
|
defaults: ["linux_bionic_supported"],
|
2015-09-17 01:33:27 +02:00
|
|
|
|
|
|
|
// NOTE: --exclude-libs=libgcc.a makes sure that any symbols libdl.so pulls from
|
|
|
|
// libgcc.a are made static to libdl.so. This in turn ensures that libraries that
|
|
|
|
// a) pull symbols from libgcc.a and b) depend on libdl.so will not rely on libdl.so
|
|
|
|
// to provide those symbols, but will instead pull them from libgcc.a. Specifically,
|
|
|
|
// we use this property to make sure libc.so has its own copy of the code from
|
|
|
|
// libgcc.a it uses.
|
|
|
|
//
|
|
|
|
// DO NOT REMOVE --exclude-libs!
|
|
|
|
|
2018-09-01 04:01:56 +02:00
|
|
|
ldflags: [
|
|
|
|
"-Wl,--exclude-libs=libgcc.a",
|
|
|
|
"-Wl,--exclude-libs=libclang_rt.builtins-arm-android.a",
|
|
|
|
"-Wl,--exclude-libs=libclang_rt.builtins-aarch64-android.a",
|
|
|
|
"-Wl,--exclude-libs=libclang_rt.builtins-x86-android.a",
|
|
|
|
"-Wl,--exclude-libs=libclang_rt.builtins-x86_64-android.a",
|
|
|
|
],
|
2015-09-17 01:33:27 +02:00
|
|
|
|
|
|
|
// for x86, exclude libgcc_eh.a for the same reasons as above
|
|
|
|
arch: {
|
2015-11-03 23:30:57 +01:00
|
|
|
arm: {
|
2018-09-07 01:04:08 +02:00
|
|
|
version_script: ":libdl.arm.map",
|
2018-05-24 03:45:53 +02:00
|
|
|
pack_relocations: false,
|
2018-01-19 01:26:19 +01:00
|
|
|
ldflags: ["-Wl,--hash-style=both"],
|
2015-11-03 23:30:57 +01:00
|
|
|
},
|
|
|
|
arm64: {
|
2018-09-07 01:04:08 +02:00
|
|
|
version_script: ":libdl.arm64.map",
|
2015-11-03 23:30:57 +01:00
|
|
|
},
|
2015-09-17 01:33:27 +02:00
|
|
|
x86: {
|
2018-05-24 03:45:53 +02:00
|
|
|
pack_relocations: false,
|
2016-11-21 21:50:38 +01:00
|
|
|
ldflags: [
|
|
|
|
"-Wl,--exclude-libs=libgcc_eh.a",
|
2018-01-19 01:26:19 +01:00
|
|
|
"-Wl,--hash-style=both",
|
2016-11-21 21:50:38 +01:00
|
|
|
],
|
2018-09-07 01:04:08 +02:00
|
|
|
version_script: ":libdl.x86.map",
|
2015-09-17 01:33:27 +02:00
|
|
|
},
|
|
|
|
x86_64: {
|
|
|
|
ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
|
2018-09-07 01:04:08 +02:00
|
|
|
version_script: ":libdl.x86_64.map",
|
2015-09-17 01:33:27 +02:00
|
|
|
},
|
|
|
|
},
|
2017-08-30 10:52:19 +02:00
|
|
|
shared: {
|
2017-10-05 17:23:10 +02:00
|
|
|
whole_static_libs: ["libdl_static"],
|
2017-08-30 10:52:19 +02:00
|
|
|
},
|
|
|
|
static: {
|
2018-04-04 00:56:35 +02:00
|
|
|
srcs: ["libdl_static.cpp"],
|
2017-08-30 10:52:19 +02:00
|
|
|
},
|
2015-09-17 01:33:27 +02:00
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Wextra",
|
|
|
|
"-Wunused",
|
|
|
|
"-Werror",
|
|
|
|
],
|
|
|
|
stl: "none",
|
|
|
|
|
2018-03-28 07:10:55 +02:00
|
|
|
nocrt: true,
|
2015-09-17 01:33:27 +02:00
|
|
|
system_shared_libs: [],
|
2018-12-20 22:52:19 +01:00
|
|
|
native_coverage: false,
|
2015-09-17 01:33:27 +02:00
|
|
|
|
2016-11-23 01:55:25 +01:00
|
|
|
// This is placeholder library the actual implementation is (currently)
|
|
|
|
// provided by the linker.
|
2018-02-06 02:30:57 +01:00
|
|
|
shared_libs: ["ld-android"],
|
2016-11-23 01:55:25 +01:00
|
|
|
|
|
|
|
sanitize: {
|
|
|
|
never: true,
|
|
|
|
},
|
2018-12-13 10:26:48 +01:00
|
|
|
|
|
|
|
stubs: {
|
|
|
|
symbol_file: "libdl.map.txt",
|
|
|
|
versions: ["10000"],
|
|
|
|
},
|
2019-01-20 13:02:00 +01:00
|
|
|
required: ["libdl.mountpoint"],
|
2016-11-23 01:55:25 +01:00
|
|
|
}
|
|
|
|
|
2016-08-04 22:45:44 +02:00
|
|
|
ndk_library {
|
2017-04-07 23:09:18 +02:00
|
|
|
name: "libdl",
|
2016-08-04 22:45:44 +02:00
|
|
|
symbol_file: "libdl.map.txt",
|
|
|
|
first_version: "9",
|
|
|
|
}
|
2017-03-20 22:07:47 +01:00
|
|
|
|
|
|
|
llndk_library {
|
2017-04-07 23:09:18 +02:00
|
|
|
name: "libdl",
|
2017-03-20 22:07:47 +01:00
|
|
|
symbol_file: "libdl.map.txt",
|
|
|
|
}
|
2018-09-07 01:04:08 +02:00
|
|
|
|
|
|
|
genrule {
|
|
|
|
name: "libdl.arm.map",
|
|
|
|
out: ["libdl.arm.map"],
|
|
|
|
srcs: ["libdl.map.txt"],
|
|
|
|
tool_files: [":bionic-generate-version-script"],
|
|
|
|
cmd: "$(location :bionic-generate-version-script) arm $(in) $(out)",
|
|
|
|
}
|
|
|
|
|
|
|
|
genrule {
|
|
|
|
name: "libdl.arm64.map",
|
|
|
|
out: ["libdl.arm64.map"],
|
|
|
|
srcs: ["libdl.map.txt"],
|
|
|
|
tool_files: [":bionic-generate-version-script"],
|
|
|
|
cmd: "$(location :bionic-generate-version-script) arm64 $(in) $(out)",
|
|
|
|
}
|
|
|
|
|
|
|
|
genrule {
|
|
|
|
name: "libdl.x86.map",
|
|
|
|
out: ["libdl.x86.map"],
|
|
|
|
srcs: ["libdl.map.txt"],
|
|
|
|
tool_files: [":bionic-generate-version-script"],
|
|
|
|
cmd: "$(location :bionic-generate-version-script) x86 $(in) $(out)",
|
|
|
|
}
|
|
|
|
|
|
|
|
genrule {
|
|
|
|
name: "libdl.x86_64.map",
|
|
|
|
out: ["libdl.x86_64.map"],
|
|
|
|
srcs: ["libdl.map.txt"],
|
|
|
|
tool_files: [":bionic-generate-version-script"],
|
|
|
|
cmd: "$(location :bionic-generate-version-script) x86_64 $(in) $(out)",
|
|
|
|
}
|