From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 706DF3858C5E for ; Thu, 23 Feb 2023 10:52:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 706DF3858C5E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from r6.localdomain (82-217-174-174.cable.dynamic.v4.ziggo.nl [82.217.174.174]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 8D27530067D6; Thu, 23 Feb 2023 11:52:39 +0100 (CET) Received: by r6.localdomain (Postfix, from userid 1000) id 4DFC1340251; Thu, 23 Feb 2023 11:52:39 +0100 (CET) Message-ID: <5660bc49c43d79e1367d4742d880051274ba4c46.camel@klomp.org> Subject: Re: [PATCH v2 03/16] Use configure to detect HAVE_DECL_MMAP and use it for system doesn't provide sys/mman.h From: Mark Wielaard To: Yonggang Luo , elfutils-devel@sourceware.org Date: Thu, 23 Feb 2023 11:52:39 +0100 In-Reply-To: <20221217165213.152-4-luoyonggang@gmail.com> References: <20221217165213.152-1-luoyonggang@gmail.com> <20221217165213.152-4-luoyonggang@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-Spam-Status: No, score=-3029.7 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, See also the discussion on v1 of this patch: https://inbox.sourceware.org/elfutils-devel/f352dba78caee57afc17995f8e36d28= ae98afbc0.camel@klomp.org/#r I think we need to think about what the libelf API looks like without mmap. In particular I think we need to decide what to do with the Elf_Cmds: ELF_C_READ_MMAP, /* Read, but mmap the file if possible. */ ELF_C_RDWR_MMAP, /* Read and write, with mmap. */ ELF_C_WRITE_MMAP, /* Write, with mmap. */ ELF_C_READ_MMAP_PRIVATE, /* Read, but memory is writable, results ar= e not written to the file. */ Specifically because libdw does reply on some of them. Thanks, Mark