From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130265 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 130224 invoked by uid 89); 10 Mar 2019 18:22:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=H*F:D*gmx.de, Allow, stabs, truncated X-HELO: mout.gmx.net Received: from mout.gmx.net (HELO mout.gmx.net) (212.227.15.18) 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 0MLvGW-1h8XGR33k4-007hO4; Sun, 10 Mar 2019 19:22:11 +0100 From: Christian Eggers To: binutils@sourceware.org Cc: Christian Eggers Subject: [PATCH 0/7] gas: Fixes for DWARF2 debug info with OCTETS_PER_BYTE>1 Date: Sun, 10 Mar 2019 18:22:00 -0000 Message-Id: <20190310182158.23705-1-ceggers@gmx.de> X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00057.txt.bz2 I'm working on a binutils port for the SDMA controller which is inside many of NXP's i.MX SOCs. In contrast to most other architectures, the SDMA has 16 bit per instruction address (OCTETS_PER_BYTE=2). Up to now, no architecture with OCTETS_PER_BYTE>1 uses DWARF debug information (tic4x and tic54x use stabs). With OCTETS_PER_BYTE=2, the smallest addressable unit is 16 bit. This is problematic with DWARF2 debug information, as this format always uses 8 bit quantities. Resulting problems can be truncated sections and displaced relocations. These patch series fixes the generation of DWARF debug information in gas for these architectures, which is a prerequisite for the SDMA port. These changes should not affect existing architectures as all targets currently using DWARF2 have 8 bit per byte. Christian Eggers (7): [gas] dwarf2: Fix calculation of line info offset [gas] Allow to create symbols with octets value [gas] dwarf2: Use octets for dwarf2 headers [gas] dwarf2: Use octets for .debug_line prologue [gas] dwarf2: Use octets for .debug_string offsets [gas] dwarf2: Pad size of .debug_line section. [gas] dwarf2: Align relocation within .debug_line section gas/ChangeLog | 42 ++++++++++++++++++++++++++++++++++++++++++ gas/dwarf2dbg.c | 55 ++++++++++++++++++++++++++++++++++++++++++------------- gas/symbols.c | 39 ++++++++++++++++++++++++++++++++++++++- gas/symbols.h | 3 +++ 4 files changed, 125 insertions(+), 14 deletions(-) -- 2.16.4