2015-09-16 23:33:27 +00:00
|
|
|
//
|
|
|
|
// libdl
|
|
|
|
//
|
2017-10-05 15:23:10 +00:00
|
|
|
cc_library_static {
|
|
|
|
name: "libdl_static",
|
2018-10-12 06:32:26 +00:00
|
|
|
defaults: ["linux_bionic_supported"],
|
2018-04-27 12:53:11 +00:00
|
|
|
recovery_available: true,
|
2017-10-05 15:23:10 +00:00
|
|
|
|
2018-02-06 01:30:57 +00:00
|
|
|
srcs: [
|
|
|
|
"libdl.cpp",
|
|
|
|
"libdl_cfi.cpp",
|
|
|
|
],
|
2017-10-05 15:23:10 +00:00
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Wextra",
|
|
|
|
"-Wunused",
|
|
|
|
"-Werror",
|
|
|
|
],
|
|
|
|
|
|
|
|
// For private/CFIShadow.h.
|
|
|
|
include_dirs: ["bionic/libc"],
|
|
|
|
|
|
|
|
stl: "none",
|
2018-12-03 21:57:20 +00:00
|
|
|
system_shared_libs: [],
|
2017-10-05 15:23:10 +00:00
|
|
|
|
|
|
|
sanitize: {
|
|
|
|
never: true,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2015-09-16 23:33:27 +00:00
|
|
|
cc_library {
|
2016-11-29 01:02:25 +00:00
|
|
|
name: "libdl",
|
2018-04-27 12:53:11 +00:00
|
|
|
recovery_available: true,
|
2017-10-27 18:21:20 +00:00
|
|
|
static_ndk_lib: true,
|
2016-11-29 01:02:25 +00:00
|
|
|
|
|
|
|
defaults: ["linux_bionic_supported"],
|
2015-09-16 23:33:27 +00: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 02:01:56 +00: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-16 23:33:27 +00:00
|
|
|
|
|
|
|
// for x86, exclude libgcc_eh.a for the same reasons as above
|
|
|
|
arch: {
|
2015-11-03 22:30:57 +00:00
|
|
|
arm: {
|
2018-09-06 23:04:08 +00:00
|
|
|
version_script: ":libdl.arm.map",
|
2018-05-24 01:45:53 +00:00
|
|
|
pack_relocations: false,
|
2018-01-19 00:26:19 +00:00
|
|
|
ldflags: ["-Wl,--hash-style=both"],
|
2015-11-03 22:30:57 +00:00
|
|
|
},
|
|
|
|
arm64: {
|
2018-09-06 23:04:08 +00:00
|
|
|
version_script: ":libdl.arm64.map",
|
2015-11-03 22:30:57 +00:00
|
|
|
},
|
2015-09-16 23:33:27 +00:00
|
|
|
x86: {
|
2018-05-24 01:45:53 +00:00
|
|
|
pack_relocations: false,
|
2016-11-21 20:50:38 +00:00
|
|
|
ldflags: [
|
|
|
|
"-Wl,--exclude-libs=libgcc_eh.a",
|
2018-01-19 00:26:19 +00:00
|
|
|
"-Wl,--hash-style=both",
|
2016-11-21 20:50:38 +00:00
|
|
|
],
|
2018-09-06 23:04:08 +00:00
|
|
|
version_script: ":libdl.x86.map",
|
2015-09-16 23:33:27 +00:00
|
|
|
},
|
|
|
|
x86_64: {
|
|
|
|
ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
|
2018-09-06 23:04:08 +00:00
|
|
|
version_script: ":libdl.x86_64.map",
|
2015-09-16 23:33:27 +00:00
|
|
|
},
|
|
|
|
},
|
2017-08-30 08:52:19 +00:00
|
|
|
shared: {
|
2017-10-05 15:23:10 +00:00
|
|
|
whole_static_libs: ["libdl_static"],
|
2017-08-30 08:52:19 +00:00
|
|
|
},
|
|
|
|
static: {
|
2018-04-03 22:56:35 +00:00
|
|
|
srcs: ["libdl_static.cpp"],
|
2017-08-30 08:52:19 +00:00
|
|
|
},
|
2015-09-16 23:33:27 +00:00
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Wextra",
|
|
|
|
"-Wunused",
|
|
|
|
"-Werror",
|
|
|
|
],
|
|
|
|
stl: "none",
|
|
|
|
|
2018-03-28 05:10:55 +00:00
|
|
|
nocrt: true,
|
2015-09-16 23:33:27 +00:00
|
|
|
system_shared_libs: [],
|
|
|
|
|
2016-11-23 00:55:25 +00:00
|
|
|
// This is placeholder library the actual implementation is (currently)
|
|
|
|
// provided by the linker.
|
2018-02-06 01:30:57 +00:00
|
|
|
shared_libs: ["ld-android"],
|
2016-11-23 00:55:25 +00:00
|
|
|
|
|
|
|
sanitize: {
|
|
|
|
never: true,
|
|
|
|
},
|
2018-12-13 09:26:48 +00:00
|
|
|
|
|
|
|
stubs: {
|
|
|
|
symbol_file: "libdl.map.txt",
|
|
|
|
versions: ["10000"],
|
|
|
|
},
|
2019-01-20 12:02:00 +00:00
|
|
|
required: ["libdl.mountpoint"],
|
2016-11-23 00:55:25 +00:00
|
|
|
}
|
|
|
|
|
2016-08-04 20:45:44 +00:00
|
|
|
ndk_library {
|
2017-04-07 21:09:18 +00:00
|
|
|
name: "libdl",
|
2016-08-04 20:45:44 +00:00
|
|
|
symbol_file: "libdl.map.txt",
|
|
|
|
first_version: "9",
|
|
|
|
}
|
2017-03-20 21:07:47 +00:00
|
|
|
|
|
|
|
llndk_library {
|
2017-04-07 21:09:18 +00:00
|
|
|
name: "libdl",
|
2017-03-20 21:07:47 +00:00
|
|
|
symbol_file: "libdl.map.txt",
|
|
|
|
}
|
2018-09-06 23:04:08 +00: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)",
|
|
|
|
}
|