From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54321 invoked by alias); 9 Jul 2019 09:05:00 -0000 Mailing-List: contact dwz-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: dwz-owner@sourceware.org Received: (qmail 54296 invoked by uid 89); 9 Jul 2019 09:05:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,SPF_PASS autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-Spam-Status: No, score=-26.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: mx1.suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Date: Tue, 01 Jan 2019 00:00:00 -0000 From: Tom de Vries To: dwz@sourceware.org, jakub@redhat.com Subject: [committed] Fix build on debian 7 Message-ID: <20190709090453.GA30780@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2019-q3/txt/msg00056.txt.bz2 Hi, On debian 7, we run into: ... dwz.c: In function ‘read_dwarf’: dwz.c:10211:34: error: ‘SHF_COMPRESSED’ undeclared ... Glibc defines SHF_COMPRESSED starting v2.22, and libelf has a fallback definition starting v0.166, which are both not present here. Fix this by adding a fallback definition in dwz.c. Committed to trunk. Thanks, - Tom Fix build on debian 7 2019-07-09 Tom de Vries * dwz.c (SHF_COMPRESSED): Define if not defined. --- dwz.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dwz.c b/dwz.c index 98f6f53..13f67f2 100644 --- a/dwz.c +++ b/dwz.c @@ -40,6 +40,13 @@ #include "hashtab.h" #include "sha1.h" +#ifndef SHF_COMPRESSED + /* Glibc elf.h contains SHF_COMPRESSED starting v2.22. Libelf libelf.h has + a fallback definition starting v0.166. Define a fallback definition here + for the case of both pre-v2.22 glibc and pre-v0.166 libelf. */ +# define SHF_COMPRESSED (1 << 11) /* Section with compressed data. */ +#endif + /* Theory of operation: The DWZ tool can either optimize debug sections of a single executable or shared library at a time, or, when -m option