From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127151 invoked by alias); 2 May 2019 15:22:37 -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 127141 invoked by uid 89); 2 May 2019 15:22:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=*h, HX-Languages-Length:1463 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 02 May 2019 15:22:35 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1hMDXe-0007Jl-4t from joseph_myers@mentor.com ; Thu, 02 May 2019 08:22:34 -0700 Received: from digraph.polyomino.org.uk (137.202.0.90) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 2 May 2019 16:22:30 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.90_1) (envelope-from ) id 1hMDXa-0001fK-7l; Thu, 02 May 2019 15:22:30 +0000 Date: Thu, 02 May 2019 15:22:00 -0000 From: Joseph Myers To: Nick Alcock CC: Subject: Re: [PATCH 00/19] libctf, and CTF support for objdump and readelf In-Reply-To: <20190430225706.159422-1-nick.alcock@oracle.com> Message-ID: References: <20190430225706.159422-1-nick.alcock@oracle.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2019-05/txt/msg00100.txt.bz2 This patch series introduces a dependency of binutils on libctf. This means libctf should be portable to the same range of hosts as binutils, all of which can be used as hosts for cross toolchains for a range of targets (ELF and non-ELF). For example, it should be portable to hosts such as MinGW or OS X. Some apparent portability issues in this code include: * Use of dlfcn.h. Such use in existing binutils code (e.g. bfd/plugin.c) is conditional, to avoid trying to use it on hosts without that functionality. * Use of sys/mman.h. Again, mmap usage in existing code is appropriately conditional. * Use of sys/errno.h. The standard name is errno.h. * Use of elf.h. Non-ELF hosts won't have such a header. You should be working with the existing include/elf/*.h definitions of ELF data structures in binutils. * Use of gelf.h. This seems to be something from some versions of libelf, which isn't an existing build dependency of binutils at all (and given the existence of multiple, incompatible versions of libelf, one should be wary of depending on it). The only gelf.h I have locally here is in a checkout of prelink sources. Again, use existing ELF structures in headers present in binutils. * Use of byteswap.h and endian.h. Such headers are not portably available. Note how byteswap.h usage in gold / elfcpp is appropriately conditional. -- Joseph S. Myers joseph@codesourcery.com