mirror of
https://github.com/ianlancetaylor/libbacktrace.git
synced 2026-09-07 12:17:06 +08:00
libbacktrace: handle MOREDATA correctly without debug info
Based on patch from Andi Kleen. * elf.c (elf_nodebug): Handle state->moredata. * fileline.c (backtrace_syminfo_to_full_callback): Remove incorrect comment about MOREDATA. (backtrace_syminfo_to_full_callback_moredata): New function. * internal.h (backtrace_syminfo_to_full_callback_moredata): Declare. * strippedtest.c: New file. * configure.ac: check whether objcopy supports --strip-debug. * Makefile.am (strippedtest_SOURCES): New variable. (strippedtest_CFLAGS, strippedtest_LDFLAGS): Likewise. (strippedtest_LDADD): Likewise. (check_PROGRAMS): Add strippedtest. (MAKETESTS): Add strippedtest_stripped (%_stripped): New rule. * configure, Makefile.in: Regenerate.
This commit is contained in:
+17
@@ -133,6 +133,23 @@ libbacktrace_noformat_la_LIBADD = $(BACKTRACE_FILE) $(VIEW_FILE) $(ALLOC_FILE)
|
||||
|
||||
libbacktrace_noformat_la_DEPENDENCIES = $(libbacktrace_noformat_la_LIBADD)
|
||||
|
||||
if HAVE_ELF
|
||||
if HAVE_OBJCOPY_STRIPDEBUG
|
||||
|
||||
strippedtest_SOURCES = strippedtest.c testlib.c
|
||||
strippedtest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -O
|
||||
strippedtest_LDFLAGS = $(libbacktrace_testing_ldflags) -all-static
|
||||
strippedtest_LDADD = libbacktrace.la
|
||||
|
||||
check_PROGRAMS += strippedtest
|
||||
MAKETESTS += strippedtest_stripped
|
||||
|
||||
%_stripped: %
|
||||
$(OBJCOPY) --strip-debug $< $@
|
||||
|
||||
endif HAVE_OBJCOPY_STRIPDEBUG
|
||||
endif HAVE_ELF
|
||||
|
||||
if HAVE_ELF
|
||||
if HAVE_OBJCOPY_DEBUGLINK
|
||||
|
||||
|
||||
Reference in New Issue
Block a user