New upstream version 10.0.0+r36
Manas Kashyap
3 years ago
21 | 21 |
cc_defaults {
|
22 | 22 |
name: "libunwind_defaults",
|
23 | 23 |
host_supported: true,
|
24 | |
vendor_available: true,
|
25 | 24 |
|
26 | 25 |
cppflags: [
|
27 | 26 |
"-Wno-old-style-cast",
|
|
120 | 119 |
// libunwind shared and static library
|
121 | 120 |
//-----------------------------------------------------------------------
|
122 | 121 |
|
123 | |
cc_library {
|
124 | |
name: "libunwind",
|
|
122 |
cc_defaults {
|
|
123 |
name: "libunwind_core_defaults",
|
125 | 124 |
defaults: ["libunwind_defaults"],
|
126 | |
vndk: {
|
127 | |
enabled: true,
|
128 | |
support_system_process: true,
|
129 | |
},
|
130 | 125 |
sdk_version: "21",
|
131 | 126 |
stl: "none",
|
132 | 127 |
|
|
402 | 397 |
},
|
403 | 398 |
|
404 | 399 |
target: {
|
405 | |
android: {
|
406 | |
shared_libs: ["libdl"],
|
407 | |
},
|
408 | |
linux: {
|
|
400 |
linux_glibc: {
|
|
401 |
// Remove dependencies on libgcc
|
409 | 402 |
ldflags: ["-nostdlib"],
|
410 | |
host_ldlibs: [
|
411 | |
"-lc",
|
412 | |
"-lpthread",
|
413 | |
],
|
414 | 403 |
},
|
415 | 404 |
linux_bionic: {
|
416 | 405 |
enabled: true,
|
417 | |
shared_libs: ["libdl"],
|
418 | 406 |
},
|
419 | 407 |
},
|
420 | 408 |
|
421 | 409 |
export_include_dirs: ["include"],
|
422 | |
|
423 | |
shared_libs: ["liblzma"],
|
424 | 410 |
|
425 | 411 |
debug: {
|
426 | 412 |
//shared_libs: ["liblog"],
|
427 | 413 |
},
|
|
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,
|
428 | 425 |
}
|
429 | 426 |
|
430 | 427 |
//-----------------------------------------------------------------------
|
|
433 | 430 |
cc_library_static {
|
434 | 431 |
name: "libunwindbacktrace",
|
435 | 432 |
defaults: ["libunwind_defaults"],
|
|
433 |
vendor_available: true,
|
436 | 434 |
sdk_version: "21",
|
437 | 435 |
srcs: [
|
438 | 436 |
"src/unwind/BacktraceWrapper.c",
|
|
460 | 458 |
"-fvisibility=hidden",
|
461 | 459 |
],
|
462 | 460 |
|
463 | |
whole_static_libs: ["libunwind"],
|
464 | |
|
465 | 461 |
target: {
|
466 | 462 |
linux_bionic: {
|
467 | 463 |
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
|
130 | 130 |
#define HAVE_LINK_H 1
|
131 | 131 |
|
132 | 132 |
/* Define if you have liblzma */
|
133 | |
#define HAVE_LZMA 1
|
|
133 |
/* #undef HAVE_LZMA */
|
134 | 134 |
|
135 | 135 |
/* Define to 1 if you have the <memory.h> header file. */
|
136 | 136 |
#define HAVE_MEMORY_H 1
|
256 | 256 |
newname = malloc (strlen (linkbuf) + strlen (debugdir)
|
257 | 257 |
+ strlen (file) + 9);
|
258 | 258 |
if (basedir == NULL || newname == NULL)
|
259 | |
goto file_error;
|
|
259 |
{
|
|
260 |
free (basedir);
|
|
261 |
free (newname);
|
|
262 |
goto load_debug_frame_error;
|
|
263 |
}
|
260 | 264 |
|
261 | 265 |
p = strrchr (file, '/');
|
262 | 266 |
if (p != NULL)
|
|
298 | 302 |
|
299 | 303 |
/* An error reading image file. Release resources and return error code */
|
300 | 304 |
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);
|
306 | 311 |
|
307 | 312 |
return 1;
|
308 | 313 |
}
|
508 | 508 |
*dst = realloc(*dst, *dst_size);
|
509 | 509 |
return true;
|
510 | 510 |
#else
|
511 | |
Debug (1, "Decompression failed - compiled without LZMA support.\n",
|
|
511 |
Debug (1, "Decompression failed - compiled without LZMA support.\n");
|
512 | 512 |
return false;
|
513 | 513 |
#endif // HAVE_LZMA
|
514 | 514 |
}
|
77 | 77 |
/* If this is a readable executable map, and not a stack map or an
|
78 | 78 |
empty map, find the load_base. */
|
79 | 79 |
if (cur_map->path[0] != '\0' && strncmp ("[stack:", cur_map->path, 7) != 0
|
|
80 |
&& strncmp ("[vsyscall]", cur_map->path, 10) != 0
|
80 | 81 |
&& (flags & (PROT_EXEC | PROT_READ)) == (PROT_EXEC | PROT_READ)
|
81 | 82 |
&& !(cur_map->flags & MAP_FLAGS_DEVICE_MEM))
|
82 | 83 |
{
|