blob: 563cf3d179961afdcafd3b22460c1d2d1d9069a4 [file] [log] [blame]
Bob Badouraa7d8352021-02-19 13:06:22 -08001package {
Aditya Choudharyd9d37c02024-02-02 13:57:12 +00002 default_team: "trendy_team_native_tools_libraries",
Bob Badouraa7d8352021-02-19 13:06:22 -08003 default_applicable_licenses: ["bionic_linker_license"],
4}
5
6license {
7 name: "bionic_linker_license",
8 visibility: [":__subpackages__"],
9 license_kinds: [
10 "SPDX-license-identifier-BSD",
11 ],
12 license_text: [
13 "NOTICE",
14 ],
15}
16
Elliott Hughesb1b2e372024-07-08 14:27:46 +000017linker_common_flags = [
18 "-fno-stack-protector",
19 "-Wstrict-overflow=5",
20 "-fvisibility=hidden",
21 "-Wall",
22 "-Wextra",
23 "-Wunused",
24 "-Werror",
25]
26
Elliott Hughes4b5d62e2024-06-20 16:21:08 +000027// ========================================================
28// linker_wrapper - Linux Bionic (on the host)
29// ========================================================
30
31// This is used for bionic on (host) Linux to bootstrap our linker embedded into
32// a binary.
33//
34// Host bionic binaries do not have a PT_INTERP section, instead this gets
35// embedded as the entry point, and the linker is embedded as ELF sections in
36// each binary. There's a linker script that sets all of that up (generated by
37// extract_linker), and defines the extern symbols used in this file.
Dan Willemsen7ccc50d2017-09-18 21:28:14 -070038cc_object {
39 name: "linker_wrapper",
40 host_supported: true,
41 device_supported: false,
Colin Crossda446cc2022-03-08 15:07:57 -080042 enabled: false,
Dan Willemsen7ccc50d2017-09-18 21:28:14 -070043 target: {
Elliott Hughesd50a1de2018-02-05 17:30:57 -080044 linux_bionic: {
45 enabled: true,
46 },
Dan Willemsen7ccc50d2017-09-18 21:28:14 -070047 },
48
Elliott Hughesb1b2e372024-07-08 14:27:46 +000049 cflags: linker_common_flags,
Dan Willemsen7ccc50d2017-09-18 21:28:14 -070050
51 srcs: [
52 "linker_wrapper.cpp",
53 ],
54 arch: {
Jiyong Park3b47d602020-09-18 16:15:53 +090055 arm64: {
Colin Crossa0a591a2021-06-11 12:46:45 -070056 srcs: ["arch/arm64/linker_wrapper_begin.S"],
Jiyong Park3b47d602020-09-18 16:15:53 +090057 },
Elliott Hughes3e4f6032022-10-22 03:54:59 +000058 riscv64: {
59 srcs: ["arch/riscv64/linker_wrapper_begin.S"],
60 },
Dan Willemsen7ccc50d2017-09-18 21:28:14 -070061 x86_64: {
Colin Crossa0a591a2021-06-11 12:46:45 -070062 srcs: ["arch/x86_64/linker_wrapper_begin.S"],
Dan Willemsen7ccc50d2017-09-18 21:28:14 -070063 },
64 },
65
Martin Stjernholm82d84bc2020-04-06 20:32:09 +010066 header_libs: ["libc_headers"],
67
Dan Willemsen7ccc50d2017-09-18 21:28:14 -070068 // We need to access Bionic private headers in the linker.
69 include_dirs: ["bionic/libc"],
70}
71
Ryan Prichard80e40f02019-10-31 19:54:46 -070072// ========================================================
73// linker default configuration
74// ========================================================
75
76// Configuration for the linker binary and any of its static libraries.
77cc_defaults {
78 name: "linker_defaults",
79 arch: {
80 arm: {
81 cflags: ["-D__work_around_b_24465209__"],
82 },
83 x86: {
84 cflags: ["-D__work_around_b_24465209__"],
85 },
86 },
87
Elliott Hughesb1b2e372024-07-08 14:27:46 +000088 cflags: linker_common_flags,
89 asflags: linker_common_flags,
Ryan Prichard80e40f02019-10-31 19:54:46 -070090
91 product_variables: {
92 debuggable: {
93 cppflags: ["-DUSE_LD_CONFIG_FILE"],
94 },
95 },
96
97 cppflags: ["-Wold-style-cast"],
98
99 static_libs: [
100 "libziparchive",
101 "libbase",
102 "libz",
103
104 "libasync_safe",
105
Jiyong Park7157dfb2022-08-19 13:09:18 +0900106 "liblog_for_runtime_apex",
Ryan Prichard80e40f02019-10-31 19:54:46 -0700107 ],
108
109 // We need to access Bionic private headers in the linker.
110 include_dirs: ["bionic/libc"],
111}
112
113// ========================================================
114// linker components
115// ========================================================
116
117// Enable a module on all targets the linker runs on (ordinary Android targets, Linux Bionic, and
118// native bridge implementations).
119cc_defaults {
120 name: "linker_all_targets",
121 defaults: ["linux_bionic_supported"],
122 recovery_available: true,
Yifan Hongb04490d2020-10-21 18:36:36 -0700123 vendor_ramdisk_available: true,
Ryan Prichard80e40f02019-10-31 19:54:46 -0700124 native_bridge_supported: true,
125}
126
127cc_library_static {
Ryan Prichard249757b2019-11-01 17:18:28 -0700128 name: "liblinker_main",
Elliott Hughes1eacc0e2024-01-19 19:05:36 +0000129 defaults: [
130 "linker_defaults",
131 "linker_all_targets",
132 ],
Ryan Prichard249757b2019-11-01 17:18:28 -0700133 srcs: ["linker_main.cpp"],
134
135 // Ensure that the compiler won't insert string function calls before ifuncs are resolved.
136 cflags: ["-ffreestanding"],
Spandan Das0a6cfe92024-01-04 18:06:50 +0000137 apex_available: [
138 "com.android.runtime",
139 ],
Ryan Prichard249757b2019-11-01 17:18:28 -0700140}
141
142cc_library_static {
Ryan Prichard80e40f02019-10-31 19:54:46 -0700143 name: "liblinker_malloc",
Elliott Hughes1eacc0e2024-01-19 19:05:36 +0000144 defaults: [
145 "linker_defaults",
146 "linker_all_targets",
147 ],
Ryan Prichard80e40f02019-10-31 19:54:46 -0700148 srcs: ["linker_memory.cpp"],
Spandan Das0a6cfe92024-01-04 18:06:50 +0000149 apex_available: [
150 "com.android.runtime",
151 ],
Ryan Prichard80e40f02019-10-31 19:54:46 -0700152}
153
154cc_library_static {
155 name: "liblinker_debuggerd_stub",
Elliott Hughes1eacc0e2024-01-19 19:05:36 +0000156 defaults: [
157 "linker_defaults",
158 "linker_all_targets",
159 ],
Ryan Prichard80e40f02019-10-31 19:54:46 -0700160 srcs: ["linker_debuggerd_stub.cpp"],
161}
162
163// ========================================================
164// template for the linker binary
165// ========================================================
166
dimitryb8b3a762018-09-25 12:31:11 +0200167filegroup {
168 name: "linker_sources",
Colin Cross97f0aef2016-07-14 16:05:46 -0700169 srcs: [
170 "dlfcn.cpp",
171 "linker.cpp",
Elliott Hughes838dbac2023-08-22 14:07:48 -0700172 "linker_auxv.cpp",
Colin Cross97f0aef2016-07-14 16:05:46 -0700173 "linker_block_allocator.cpp",
Dimitry Ivanov769b33f2016-07-21 11:33:40 -0700174 "linker_dlwarning.cpp",
Evgenii Stepanov0a3637d2016-07-06 13:20:59 -0700175 "linker_cfi.cpp",
Dimitry Ivanov4cabfaa2017-03-07 11:19:05 -0800176 "linker_config.cpp",
Ryan Prichard551565e2019-12-23 16:03:14 -0800177 "linker_debug.cpp",
Colin Cross97f0aef2016-07-14 16:05:46 -0700178 "linker_gdb_support.cpp",
Dimitry Ivanov48ec2882016-08-04 11:50:36 -0700179 "linker_globals.cpp",
Colin Cross97f0aef2016-07-14 16:05:46 -0700180 "linker_libc_support.c",
Dimitry Ivanov451909d2017-01-26 16:52:59 -0800181 "linker_libcxx_support.cpp",
Dimitry Ivanovb943f302016-08-03 16:00:10 -0700182 "linker_namespaces.cpp",
Colin Cross97f0aef2016-07-14 16:05:46 -0700183 "linker_logger.cpp",
184 "linker_mapped_file_fragment.cpp",
Tamas Petz8d55d182020-02-24 14:15:25 +0100185 "linker_note_gnu_property.cpp",
Colin Cross97f0aef2016-07-14 16:05:46 -0700186 "linker_phdr.cpp",
Ryan Prichard339ecef2020-01-02 16:36:06 -0800187 "linker_relocate.cpp",
Colin Cross97f0aef2016-07-14 16:05:46 -0700188 "linker_sdk_versions.cpp",
Dimitry Ivanov48ec2882016-08-04 11:50:36 -0700189 "linker_soinfo.cpp",
Collin Fijalkovich47d27aa2021-03-24 10:17:39 -0700190 "linker_transparent_hugepage_support.cpp",
Ryan Prichard45d13492019-01-03 02:51:30 -0800191 "linker_tls.cpp",
Colin Cross97f0aef2016-07-14 16:05:46 -0700192 "linker_utils.cpp",
193 "rt.cpp",
194 ],
dimitryb8b3a762018-09-25 12:31:11 +0200195}
Colin Cross97f0aef2016-07-14 16:05:46 -0700196
dimitryb8b3a762018-09-25 12:31:11 +0200197filegroup {
198 name: "linker_sources_arm",
199 srcs: [
200 "arch/arm/begin.S",
Ryan Prichard129f7a12019-12-23 16:45:47 -0800201 "arch/arm_neon/linker_gnu_hash_neon.cpp",
dimitryb8b3a762018-09-25 12:31:11 +0200202 ],
203}
204
205filegroup {
206 name: "linker_sources_arm64",
207 srcs: [
208 "arch/arm64/begin.S",
Ryan Prichardffaae702019-01-23 17:47:10 -0800209 "arch/arm64/tlsdesc_resolver.S",
Ryan Prichard129f7a12019-12-23 16:45:47 -0800210 "arch/arm_neon/linker_gnu_hash_neon.cpp",
dimitryb8b3a762018-09-25 12:31:11 +0200211 ],
212}
213
214filegroup {
Elliott Hughes3e4f6032022-10-22 03:54:59 +0000215 name: "linker_sources_riscv64",
216 srcs: [
217 "arch/riscv64/begin.S",
Paul Kirth4d437782024-01-30 23:03:14 +0000218 "arch/riscv64/tlsdesc_resolver.S",
Elliott Hughes3e4f6032022-10-22 03:54:59 +0000219 ],
220}
221
222filegroup {
dimitryb8b3a762018-09-25 12:31:11 +0200223 name: "linker_sources_x86",
224 srcs: [
225 "arch/x86/begin.S",
226 ],
227}
228
229filegroup {
230 name: "linker_sources_x86_64",
231 srcs: [
232 "arch/x86_64/begin.S",
233 ],
234}
235
dimitryb8b3a762018-09-25 12:31:11 +0200236cc_defaults {
Ryan Prichard80e40f02019-10-31 19:54:46 -0700237 name: "linker_version_script_overlay",
238 arch: {
Elliott Hughes1eacc0e2024-01-19 19:05:36 +0000239 arm: {
240 version_script: "linker.arm.map",
241 },
242 arm64: {
243 version_script: "linker.generic.map",
244 },
245 riscv64: {
246 version_script: "linker.generic.map",
247 },
248 x86: {
249 version_script: "linker.generic.map",
250 },
251 x86_64: {
252 version_script: "linker.generic.map",
253 },
Ryan Prichard80e40f02019-10-31 19:54:46 -0700254 },
255}
256
257// A template for the linker binary. May be inherited by native bridge implementations.
258cc_defaults {
259 name: "linker_bin_template",
Elliott Hughes89aada12024-07-01 21:59:04 +0000260 defaults: [
261 "linker_defaults",
262 "keep_symbols",
263 ],
Ryan Prichard80e40f02019-10-31 19:54:46 -0700264
265 srcs: [":linker_sources"],
266
Colin Cross97f0aef2016-07-14 16:05:46 -0700267 arch: {
268 arm: {
Ryan Prichard80e40f02019-10-31 19:54:46 -0700269 srcs: [":linker_sources_arm"],
Ryan Prichard80e40f02019-10-31 19:54:46 -0700270 },
271 arm64: {
272 srcs: [":linker_sources_arm64"],
Colin Cross97f0aef2016-07-14 16:05:46 -0700273 },
Elliott Hughes3e4f6032022-10-22 03:54:59 +0000274 riscv64: {
275 srcs: [":linker_sources_riscv64"],
Elliott Hughes3e4f6032022-10-22 03:54:59 +0000276 },
Colin Cross97f0aef2016-07-14 16:05:46 -0700277 x86: {
Ryan Prichard80e40f02019-10-31 19:54:46 -0700278 srcs: [":linker_sources_x86"],
279 },
280 x86_64: {
281 srcs: [":linker_sources_x86_64"],
282 },
Colin Cross97f0aef2016-07-14 16:05:46 -0700283 },
284
Elliott Hughes4b5d62e2024-06-20 16:21:08 +0000285 static_executable: true,
286
Ryan Prichard80e40f02019-10-31 19:54:46 -0700287 // -shared is used to overwrite the -Bstatic and -static flags triggered by enabling
Elliott Hughes4b5d62e2024-06-20 16:21:08 +0000288 // static_executable. The dynamic linker is actually a shared object linked with static
Ryan Prichard80e40f02019-10-31 19:54:46 -0700289 // libraries.
Colin Cross97f0aef2016-07-14 16:05:46 -0700290 ldflags: [
291 "-shared",
292 "-Wl,-Bsymbolic",
293 "-Wl,--exclude-libs,ALL",
dimitry8e8c2c02018-01-04 12:08:32 +0100294 "-Wl,-soname,ld-android.so",
Peter Collingbournec630da52024-03-26 13:24:06 -0700295 // When the linker applies its own IRELATIVE relocations, it will only read DT_REL[A] and
296 // DT_JMPREL, not DT_ANDROID_REL[A], which can also theoretically contain IRELATIVE
297 // relocations. lld has been taught to not store them there as a bug workaround (see
298 // https://llvm.org/pr86751) but the workaround could be removed at some point in the
299 // future. So we explicitly prevent it from doing so by disabling DT_ANDROID_REL[A] when
300 // linking the linker (DT_RELR cannot encode IRELATIVE relocations).
301 "-Wl,--pack-dyn-relocs=relr",
Colin Cross97f0aef2016-07-14 16:05:46 -0700302 ],
303
Elliott Hughes4b5d62e2024-06-20 16:21:08 +0000304 // We link libc++_static manually because otherwise the build system will
305 // automatically add libdl to the list of static libraries.
Dimitry Ivanovfc0d4802016-12-06 11:10:09 -0800306 stl: "none",
307
Elliott Hughes4b5d62e2024-06-20 16:21:08 +0000308 // We don't want crtbegin.o (because we have our own arch/*/begin.o),
309 // so unset it just for this module.
Colin Cross97f0aef2016-07-14 16:05:46 -0700310 nocrt: true,
311
dimitryb8b3a762018-09-25 12:31:11 +0200312 // Insert an extra objcopy step to add prefix to symbols. This is needed to prevent gdb
313 // looking up symbols in the linker by mistake.
314 prefix_symbols: "__dl_",
315
316 sanitize: {
317 hwaddress: false,
Florian Mayerc0aa70a2024-06-24 15:49:20 -0700318 memtag_stack: false,
dimitryb8b3a762018-09-25 12:31:11 +0200319 },
dimitryb8b3a762018-09-25 12:31:11 +0200320
Colin Cross97f0aef2016-07-14 16:05:46 -0700321 static_libs: [
Ryan Prichard249757b2019-11-01 17:18:28 -0700322 "liblinker_main",
Ryan Prichard80e40f02019-10-31 19:54:46 -0700323 "liblinker_malloc",
324
Elliott Hughes4b5d62e2024-06-20 16:21:08 +0000325 // We use a version of libc++ built without exceptions,
326 // because accessing EH globals uses ELF TLS,
327 // which is not supported in the loader.
Ryan Prichard0bac1cb2024-05-03 01:15:00 +0000328 "libc++_static_noexcept",
Elliott Hughes4b5d62e2024-06-20 16:21:08 +0000329
Colin Cross97f0aef2016-07-14 16:05:46 -0700330 "libc_nomalloc",
Ryan Prichard249757b2019-11-01 17:18:28 -0700331 "libc_dynamic_dispatch",
Dimitry Ivanov451909d2017-01-26 16:52:59 -0800332 "libm",
Ryan Prichardcdf71752020-12-16 03:37:22 -0800333 "libunwind",
Colin Cross97f0aef2016-07-14 16:05:46 -0700334 ],
Colin Cross97f0aef2016-07-14 16:05:46 -0700335
Ryan Prichard80e40f02019-10-31 19:54:46 -0700336 system_shared_libs: [],
337
338 // Opt out of native_coverage when opting out of system_shared_libs
339 native_coverage: false,
340}
341
342// ========================================================
343// linker[_asan][64] binary
344// ========================================================
345
346cc_binary {
Colin Cross97f0aef2016-07-14 16:05:46 -0700347 name: "linker",
Ryan Prichard80e40f02019-10-31 19:54:46 -0700348 defaults: [
349 "linker_bin_template",
350 "linux_bionic_supported",
351 "linker_version_script_overlay",
352 ],
353
Victor Khimenkod15229d2020-05-14 22:14:45 +0200354 srcs: [
355 "linker_translate_path.cpp",
356 ],
357
Colin Cross10fffb42016-12-08 09:57:35 -0800358 symlinks: ["linker_asan"],
Florian Mayerc10d0642023-03-22 16:12:49 -0700359 arch: {
360 arm64: {
361 symlinks: ["linker_hwasan"],
362 },
363 },
Colin Cross97f0aef2016-07-14 16:05:46 -0700364 multilib: {
Colin Cross97f0aef2016-07-14 16:05:46 -0700365 lib64: {
366 suffix: "64",
Colin Cross10fffb42016-12-08 09:57:35 -0800367 },
Colin Cross97f0aef2016-07-14 16:05:46 -0700368 },
Pirama Arumuga Nainarfcd35382019-02-14 13:48:01 -0800369
Ryan Prichard80e40f02019-10-31 19:54:46 -0700370 compile_multilib: "both",
Ryan Prichard80e40f02019-10-31 19:54:46 -0700371
372 recovery_available: true,
Yifan Hongb04490d2020-10-21 18:36:36 -0700373 vendor_ramdisk_available: true,
Ryan Prichard80e40f02019-10-31 19:54:46 -0700374 apex_available: [
375 "//apex_available:platform",
376 "com.android.runtime",
377 ],
Pirama Arumuga Nainarfcd35382019-02-14 13:48:01 -0800378
Colin Cross97f0aef2016-07-14 16:05:46 -0700379 target: {
Dan Willemsen7ec52b12016-11-28 17:02:25 -0800380 android: {
Ryan Prichard80e40f02019-10-31 19:54:46 -0700381 srcs: [
382 "linker_debuggerd_android.cpp",
383 ],
Dan Albert4ea19212019-07-23 13:31:14 -0700384 static_libs: [
Ryan Prichard0bac1cb2024-05-03 01:15:00 +0000385 "libc++demangle_noexcept",
Dan Albert4ea19212019-07-23 13:31:14 -0700386 "libdebuggerd_handler_fallback",
387 ],
Dan Willemsen7ec52b12016-11-28 17:02:25 -0800388 },
Ryan Prichard80e40f02019-10-31 19:54:46 -0700389 linux_bionic: {
390 static_libs: [
391 "liblinker_debuggerd_stub",
392 ],
Yi Kong6f6daaa2020-12-10 01:27:44 +0800393 },
Colin Cross97f0aef2016-07-14 16:05:46 -0700394 },
Yi Konga7e363f2020-10-01 04:10:01 +0800395
Yi Konge20a1d92022-01-25 03:19:58 +0800396 afdo: true,
Colin Cross97f0aef2016-07-14 16:05:46 -0700397}
dimitry11da1dc2018-01-05 13:35:43 +0100398
Ryan Prichard80e40f02019-10-31 19:54:46 -0700399// ========================================================
400// assorted modules
401// ========================================================
402
Elliott Hughes90f96b92019-05-09 15:56:39 -0700403sh_binary {
404 name: "ldd",
Rupert Shuttlewortha7e29a82021-02-18 13:35:22 +0000405 src: "ldd.sh",
Elliott Hughes90f96b92019-05-09 15:56:39 -0700406}
407
Collin Fijalkovichc9521e02021-04-29 11:31:50 -0700408// Used to generate binaries that can be backed by transparent hugepages.
409cc_defaults {
410 name: "linker_hugepage_aligned",
411 arch: {
412 arm64: {
413 ldflags: ["-z max-page-size=0x200000"],
414 },
415 x86_64: {
416 ldflags: ["-z max-page-size=0x200000"],
417 },
418 },
419}
420
dimitry11da1dc2018-01-05 13:35:43 +0100421cc_library {
dimitry581723e2018-01-05 14:31:44 +0100422 srcs: ["ld_android.cpp"],
dimitry11da1dc2018-01-05 13:35:43 +0100423 cflags: [
424 "-Wall",
425 "-Wextra",
426 "-Wunused",
427 "-Werror",
428 ],
429 stl: "none",
430
431 name: "ld-android",
Elliott Hughes1eacc0e2024-01-19 19:05:36 +0000432 defaults: [
433 "linux_bionic_supported",
434 "linker_version_script_overlay",
435 ],
Yifan Hong5a39cee2020-01-21 16:43:56 -0800436 ramdisk_available: true,
Yifan Hongb04490d2020-10-21 18:36:36 -0700437 vendor_ramdisk_available: true,
Jiyong Park5603c6e2018-04-27 21:53:11 +0900438 recovery_available: true,
dimitry7f048802019-05-03 15:57:34 +0200439 native_bridge_supported: true,
dimitry11da1dc2018-01-05 13:35:43 +0100440
Ryan Prichard470b6662018-03-27 22:10:55 -0700441 nocrt: true,
dimitry11da1dc2018-01-05 13:35:43 +0100442 system_shared_libs: [],
Martin Stjernholm82d84bc2020-04-06 20:32:09 +0100443 header_libs: ["libc_headers"],
dimitry11da1dc2018-01-05 13:35:43 +0100444
Pirama Arumuga Nainarfcd35382019-02-14 13:48:01 -0800445 // Opt out of native_coverage when opting out of system_shared_libs
446 native_coverage: false,
447
dimitry11da1dc2018-01-05 13:35:43 +0100448 sanitize: {
449 never: true,
450 },
Jiyong Parke87e0dc2019-10-02 17:09:33 +0900451
452 apex_available: [
453 "//apex_available:platform",
454 "com.android.runtime",
455 ],
dimitry11da1dc2018-01-05 13:35:43 +0100456}
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800457
458cc_test {
459 name: "linker-unit-tests",
Colin Cross0cc60af2021-09-30 14:04:39 -0700460 test_suites: ["device-tests"],
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800461
462 cflags: [
463 "-g",
464 "-Wall",
465 "-Wextra",
466 "-Wunused",
467 "-Werror",
468 ],
469
470 // We need to access Bionic private headers in the linker.
471 include_dirs: ["bionic/libc"],
472
473 srcs: [
474 // Tests.
475 "linker_block_allocator_test.cpp",
476 "linker_config_test.cpp",
477 "linked_list_test.cpp",
Tamas Petz8d55d182020-02-24 14:15:25 +0100478 "linker_note_gnu_property_test.cpp",
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800479 "linker_sleb128_test.cpp",
480 "linker_utils_test.cpp",
Ryan Prichard129f7a12019-12-23 16:45:47 -0800481 "linker_gnu_hash_test.cpp",
Kalesh Singh0396f872024-02-02 22:11:08 -0800482 "linker_crt_pad_segment_test.cpp",
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800483
484 // Parts of the linker that we're testing.
Kalesh Singh0396f872024-02-02 22:11:08 -0800485 ":elf_note_sources",
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800486 "linker_block_allocator.cpp",
487 "linker_config.cpp",
Ryan Prichard551565e2019-12-23 16:03:14 -0800488 "linker_debug.cpp",
Tamas Petz8d55d182020-02-24 14:15:25 +0100489 "linker_note_gnu_property.cpp",
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800490 "linker_test_globals.cpp",
491 "linker_utils.cpp",
Kalesh Singh0396f872024-02-02 22:11:08 -0800492 "linker_phdr.cpp",
493 "linker_mapped_file_fragment.cpp",
494 "linker_sdk_versions.cpp",
495 "linker_dlwarning.cpp",
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800496 ],
497
498 static_libs: [
499 "libasync_safe",
500 "libbase",
Jiyong Park7157dfb2022-08-19 13:09:18 +0900501 "liblog_for_runtime_apex",
Kalesh Singh4084b552024-03-13 13:35:49 -0700502 "libprocinfo", // For procinfo::MappedFileSize()
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800503 ],
Ryan Prichard129f7a12019-12-23 16:45:47 -0800504
Kalesh Singh0396f872024-02-02 22:11:08 -0800505 data_libs: [
506 "crt_pad_segment_disabled",
507 "crt_pad_segment_enabled",
508 "no_crt_pad_segment",
509 ],
510
Ryan Prichard129f7a12019-12-23 16:45:47 -0800511 arch: {
512 arm: {
513 srcs: ["arch/arm_neon/linker_gnu_hash_neon.cpp"],
514 },
515 arm64: {
516 srcs: ["arch/arm_neon/linker_gnu_hash_neon.cpp"],
517 },
518 },
519}
520
521cc_benchmark {
522 name: "linker-benchmarks",
523
524 srcs: [
525 "linker_gnu_hash_benchmark.cpp",
526 ],
527
528 arch: {
529 arm: {
530 srcs: ["arch/arm_neon/linker_gnu_hash_neon.cpp"],
531 },
532 arm64: {
533 srcs: ["arch/arm_neon/linker_gnu_hash_neon.cpp"],
534 },
535 },
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800536}