2 name: "liblinker_malloc",
3 defaults: ["linux_bionic_supported"],
6 "linker_allocator.cpp",
10 // We need to access Bionic private headers in the linker.
11 include_dirs: ["bionic/libc"],
13 static_libs: ["libasync_safe"],
17 defaults: ["linux_bionic_supported"],
21 "linker_block_allocator.cpp",
22 "linker_dlwarning.cpp",
25 "linker_gdb_support.cpp",
27 "linker_libc_support.c",
28 "linker_libcxx_support.cpp",
30 "linker_namespaces.cpp",
32 "linker_mapped_file_fragment.cpp",
34 "linker_sdk_versions.cpp",
42 srcs: ["arch/arm/begin.S"],
44 cflags: ["-D__work_around_b_24465209__"],
47 srcs: ["arch/arm64/begin.S"],
50 srcs: ["arch/x86/begin.c"],
52 cflags: ["-D__work_around_b_24465209__"],
55 srcs: ["arch/x86_64/begin.S"],
65 "arch/mips64/begin.S",
71 // We need to access Bionic private headers in the linker.
72 include_dirs: ["bionic/libc"],
74 // -shared is used to overwrite the -Bstatic and -static
75 // flags triggered by LOCAL_FORCE_STATIC_EXECUTABLE.
76 // This dynamic linker is actually a shared object linked with static libraries.
80 "-Wl,--exclude-libs,ALL",
84 "-fno-stack-protector",
85 "-Wstrict-overflow=5",
86 "-fvisibility=hidden",
93 // TODO: split out the asflags.
95 "-fno-stack-protector",
96 "-Wstrict-overflow=5",
97 "-fvisibility=hidden",
104 cppflags: ["-Wold-style-cast"],
106 // we are going to link libc++_static manually because
107 // when stl is not set to "none" build system adds libdl
108 // to the list of static libraries which needs to be
109 // avoided in the case of building loader.
112 // we don't want crtbegin.o (because we have begin.o), so unset it
113 // just for this module
124 "libdebuggerd_handler_fallback",
129 // Important: The liblinker_malloc should be the last library in the list
130 // to overwrite any other malloc implementations by other static libraries.
133 static_executable: true,
136 symlinks: ["linker_asan"],
144 static_libs: ["libdebuggerd_client"],
147 cflags: ["-DTARGET_IS_64_BIT"],
150 cflags: ["-DTARGET_IS_64_BIT"],
153 compile_multilib: "both",
155 // Leave the symbols in the shared library so that stack unwinders can produce
156 // meaningful name resolution.
161 // Insert an extra objcopy step to add prefix to symbols. This is needed to prevent gdb
162 // looking up symbols in the linker by mistake.
163 prefix_symbols: "__dl_",