From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from vmicros1.altlinux.org (vmicros1.altlinux.org [194.107.17.57]) by sourceware.org (Postfix) with ESMTP id 933933858D29 for ; Mon, 22 Mar 2021 21:45:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 933933858D29 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=altlinux.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ldv@altlinux.org Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 0F4B572C8B2 for ; Tue, 23 Mar 2021 00:45:41 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id F0A8E7CC8AA; Tue, 23 Mar 2021 00:45:40 +0300 (MSK) Date: Mon, 22 Mar 2021 20:00:00 +0000 From: "Dmitry V. Levin" To: debugedit@sourceware.org Cc: Vitaly Chikunov Subject: [PATCH] tests: fix for toolchains producing compressed debug sections Message-ID: <20210322200000.GA3531@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: debugedit@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: debugedit development mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2021 21:45:43 -0000 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 --- 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