Codebase list android-platform-external-libunwind / upstream/latest
New upstream version 10.0.0+r36 Manas Kashyap 3 years ago
6 changed file(s) with 38 addition(s) and 28 deletion(s). Raw diff Collapse all Expand all
2121 cc_defaults {
2222 name: "libunwind_defaults",
2323 host_supported: true,
24 vendor_available: true,
2524
2625 cppflags: [
2726 "-Wno-old-style-cast",
120119 // libunwind shared and static library
121120 //-----------------------------------------------------------------------
122121
123 cc_library {
124 name: "libunwind",
122 cc_defaults {
123 name: "libunwind_core_defaults",
125124 defaults: ["libunwind_defaults"],
126 vndk: {
127 enabled: true,
128 support_system_process: true,
129 },
130125 sdk_version: "21",
131126 stl: "none",
132127
402397 },
403398
404399 target: {
405 android: {
406 shared_libs: ["libdl"],
407 },
408 linux: {
400 linux_glibc: {
401 // Remove dependencies on libgcc
409402 ldflags: ["-nostdlib"],
410 host_ldlibs: [
411 "-lc",
412 "-lpthread",
413 ],
414403 },
415404 linux_bionic: {
416405 enabled: true,
417 shared_libs: ["libdl"],
418406 },
419407 },
420408
421409 export_include_dirs: ["include"],
422
423 shared_libs: ["liblzma"],
424410
425411 debug: {
426412 //shared_libs: ["liblog"],
427413 },
414 }
415
416 cc_library_shared {
417 name: "libunwind",
418 defaults: ["libunwind_core_defaults"],
419 }
420
421 cc_library_static {
422 name: "libunwind_static",
423 defaults: ["libunwind_core_defaults"],
424 vendor_available: true,
428425 }
429426
430427 //-----------------------------------------------------------------------
433430 cc_library_static {
434431 name: "libunwindbacktrace",
435432 defaults: ["libunwind_defaults"],
433 vendor_available: true,
436434 sdk_version: "21",
437435 srcs: [
438436 "src/unwind/BacktraceWrapper.c",
460458 "-fvisibility=hidden",
461459 ],
462460
463 whole_static_libs: ["libunwind"],
464
465461 target: {
466462 linux_bionic: {
467463 enabled: true,
0 # Default owners are top 3 active developers of the past 1 or 2 years
1 # or people with more than 10 commits last year.
2 # Please update this list if you find better owner candidates.
3 cferris@google.com
4 dwillemsen@google.com
5 justinyun@google.com
6 ccross@android.com
7 enh@google.com
130130 #define HAVE_LINK_H 1
131131
132132 /* Define if you have liblzma */
133 #define HAVE_LZMA 1
133 /* #undef HAVE_LZMA */
134134
135135 /* Define to 1 if you have the <memory.h> header file. */
136136 #define HAVE_MEMORY_H 1
256256 newname = malloc (strlen (linkbuf) + strlen (debugdir)
257257 + strlen (file) + 9);
258258 if (basedir == NULL || newname == NULL)
259 goto file_error;
259 {
260 free (basedir);
261 free (newname);
262 goto load_debug_frame_error;
263 }
260264
261265 p = strrchr (file, '/');
262266 if (p != NULL)
298302
299303 /* An error reading image file. Release resources and return error code */
300304 file_error:
301 free(stringtab);
302 free(sec_hdrs);
303 free(linkbuf);
304 free(*buf);
305 fclose(f);
305 free (stringtab);
306 free (sec_hdrs);
307 fclose (f);
308 load_debug_frame_error:
309 free (linkbuf);
310 free (*buf);
306311
307312 return 1;
308313 }
508508 *dst = realloc(*dst, *dst_size);
509509 return true;
510510 #else
511 Debug (1, "Decompression failed - compiled without LZMA support.\n",
511 Debug (1, "Decompression failed - compiled without LZMA support.\n");
512512 return false;
513513 #endif // HAVE_LZMA
514514 }
7777 /* If this is a readable executable map, and not a stack map or an
7878 empty map, find the load_base. */
7979 if (cur_map->path[0] != '\0' && strncmp ("[stack:", cur_map->path, 7) != 0
80 && strncmp ("[vsyscall]", cur_map->path, 10) != 0
8081 && (flags & (PROT_EXEC | PROT_READ)) == (PROT_EXEC | PROT_READ)
8182 && !(cur_map->flags & MAP_FLAGS_DEVICE_MEM))
8283 {