From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40702 invoked by alias); 21 Feb 2020 10:02:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 40677 invoked by uid 89); 21 Feb 2020 10:02:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=2164 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Feb 2020 10:02:46 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 30667B174; Fri, 21 Feb 2020 10:02:44 +0000 (UTC) Date: Fri, 21 Feb 2020 10:02:00 -0000 From: Richard Biener To: gcc-patches@gcc.gnu.org cc: mwilliams@fb.com, jason@redhat.com Subject: [PATCH] fix -fdebug-prefix-map without gas .file support Message-ID: User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SW-Source: 2020-02/txt/msg01192.txt.bz2 This applies file mapping when emitting the directory table directly instead of using the assemblers .file directive where we already correctly apply the map. Notably the non-assembler path is used for the early debug emission for LTO. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk? Thanks, Richard. 2020-02-21 Mark Williams * dwarf2out.c (file_name_acquire): Call remap_debug_filename. --- gcc/dwarf2out.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 577be3d52d3..ba9da0f2cc2 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -12205,8 +12205,9 @@ file_name_acquire (dwarf_file_data **slot, file_name_acquire_data *fnad) fi = fnad->files + fnad->used_files++; + f = remap_debug_filename (d->filename); + /* Skip all leading "./". */ - f = d->filename; while (f[0] == '.' && IS_DIR_SEPARATOR (f[1])) f += 2; -- 2.16.4