From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130339 invoked by alias); 10 Mar 2019 18:22:17 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 130226 invoked by uid 89); 10 Mar 2019 18:22:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=H*MI:sk:2019031, H*i:sk:2019031, H*f:sk:2019031, H*F:D*gmx.de X-HELO: mout.gmx.net Received: from mout.gmx.net (HELO mout.gmx.net) (212.227.15.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 10 Mar 2019 18:22:15 +0000 Received: from zbook-opensuse.wgnetz.xx ([95.114.8.183]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MUHoI-1hTxsE1Yn4-00R5CI; Sun, 10 Mar 2019 19:22:12 +0100 From: Christian Eggers To: binutils@sourceware.org Cc: Christian Eggers Subject: [PATCH 5/7] [gas] dwarf2: Use octets for .debug_string offsets Date: Sun, 10 Mar 2019 18:22:00 -0000 Message-Id: <20190310182158.23705-6-ceggers@gmx.de> In-Reply-To: <20190310182158.23705-1-ceggers@gmx.de> References: <20190310182158.23705-1-ceggers@gmx.de> X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00059.txt.bz2 Like other dwarf2 offsets, also the string offsets in the .debug_info section which points into the .debug_str section must be expressed in octets instead of bytes. This change should not affect existing targets as all targets currently using DWARF2 have 8 bit per byte. Signed-off-by: Christian Eggers --- gas/ChangeLog | 5 +++++ gas/dwarf2dbg.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 4cb2702ab2..2d7dabc299 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2019-03-10 Christian Eggers + + * dwarf2dbg.c: Use octets for .debug_string pointers. + (out_debug_str): symbol_temp_new_now() --> symbol_temp_new_now_octets() + 2019-03-10 Christian Eggers * dwarf2dbg.c: Use octets for .debug_line prologue. diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c index 896a8f125a..d469138576 100644 --- a/gas/dwarf2dbg.c +++ b/gas/dwarf2dbg.c @@ -2103,7 +2103,7 @@ out_debug_str (segT str_seg, symbolS **name_sym, symbolS **comp_dir_sym, on the command line, so assume files[1] is the main input file. We're not supposed to get called unless at least one line number entry was emitted, so this should always be defined. */ - *name_sym = symbol_temp_new_now (); + *name_sym = symbol_temp_new_now_octets (); if (files_in_use == 0) abort (); if (files[1].dir) @@ -2125,14 +2125,14 @@ out_debug_str (segT str_seg, symbolS **name_sym, symbolS **comp_dir_sym, memcpy (p, files[1].filename, len); /* DW_AT_comp_dir */ - *comp_dir_sym = symbol_temp_new_now (); + *comp_dir_sym = symbol_temp_new_now_octets (); comp_dir = remap_debug_filename (getpwd ()); len = strlen (comp_dir) + 1; p = frag_more (len); memcpy (p, comp_dir, len); /* DW_AT_producer */ - *producer_sym = symbol_temp_new_now (); + *producer_sym = symbol_temp_new_now_octets (); sprintf (producer, "GNU AS %s", VERSION); len = strlen (producer) + 1; p = frag_more (len); -- 2.16.4