From: "Dmitry V. Levin" <ldv@altlinux.org>
To: debugedit@sourceware.org
Cc: Vitaly Chikunov <vt@altlinux.org>
Subject: [PATCH] tests: fix for toolchains producing compressed debug sections
Date: Mon, 22 Mar 2021 20:00:00 +0000 [thread overview]
Message-ID: <20210322200000.GA3531@altlinux.org> (raw)
When toolchain produces compressed debug sections by default,
quite a few debugedit tests fail because of unexpected
"debugedit: ./foo.o: DWARF version 0 unhandled" error diagnostic messages:
3: debugedit .debug_str objects DWARF4 FAILED (debugedit.at:97)
4: debugedit .debug_str/line_str objects DWARF5 FAILED (debugedit.at:129)
9: debugedit .debug_info objects FAILED (debugedit.at:291)
12: debugedit .debug_types objects FAILED (debugedit.at:370)
15: debugedit .debug_line objects DWARF4 FAILED (debugedit.at:460)
16: debugedit .debug_line objects DWARF5 FAILED (debugedit.at:484)
21: debugedit .debug_macro objects FAILED (debugedit.at:598)
Fix this by instructing gcc not to produce compressed debug sections
in object files prepared for debugedit tests.
* tests/debugedit.at: Add "-gz=none" to "gcc -g3" invocations.
Co-authored-by: Vitaly Chikunov <vt@altlinux.org>
---
tests/debugedit.at | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/debugedit.at b/tests/debugedit.at
index fb55574..2d1870b 100644
--- a/tests/debugedit.at
+++ b/tests/debugedit.at
@@ -37,11 +37,11 @@ cp "${abs_srcdir}"/data/SOURCES/foobar.h subdir_headers
cp "${abs_srcdir}"/data/SOURCES/baz.c .
# First three object files (foo.o subdir_bar/bar.o and baz.o)
-gcc -g3 -Isubdir_headers $1 -c subdir_foo/foo.c
+gcc -g3 -gz=none -Isubdir_headers $1 -c subdir_foo/foo.c
cd subdir_bar
-gcc -g3 -I../subdir_headers $1 -c bar.c
+gcc -g3 -gz=none -I../subdir_headers $1 -c bar.c
cd ..
-gcc -g3 -I$(pwd)/subdir_headers $1 -c $(pwd)/baz.c
+gcc -g3 -gz=none -I$(pwd)/subdir_headers $1 -c $(pwd)/baz.c
# Then a partially linked object file (somewhat like a kernel module).
# This will still have relocations between the debug sections.
@@ -49,7 +49,7 @@ ld -r -o foobarbaz.part.o foo.o subdir_bar/bar.o baz.o
# Create an executable. Relocations between debug sections will
# have been resolved.
-gcc -g3 -o foobarbaz.exe foo.o subdir_bar/bar.o baz.o
+gcc -g3 -gz=none -o foobarbaz.exe foo.o subdir_bar/bar.o baz.o
]])
# ===
--
ldv
next reply other threads:[~2021-03-22 21:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 20:00 Dmitry V. Levin [this message]
2021-03-23 14:20 ` Mark Wielaard
2021-03-23 14:28 ` Dmitry V. Levin
2021-03-23 15:05 ` Mark Wielaard
2021-03-24 23:45 ` Dmitry V. Levin
2021-03-25 23:12 ` Mark Wielaard
2021-03-28 0:46 ` Dmitry V. Levin
2021-03-28 14:01 ` Mark Wielaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210322200000.GA3531@altlinux.org \
--to=ldv@altlinux.org \
--cc=debugedit@sourceware.org \
--cc=vt@altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).