From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward500b.mail.yandex.net (forward500b.mail.yandex.net [178.154.239.144]) by sourceware.org (Postfix) with ESMTPS id 1338B3858D28 for ; Fri, 31 Mar 2023 15:03:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1338B3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=yandex.ru Received: from mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:2688:0:640:373d:0]) by forward500b.mail.yandex.net (Yandex) with ESMTP id 0B6145EF0F; Fri, 31 Mar 2023 18:03:23 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id J3MfxkEsN8c0-ZKK2SQO3; Fri, 31 Mar 2023 18:03:22 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1680275002; bh=Zlb9qhtK5wGfw1Y/jt/EOYnutlQxAFXmdxhuzQ4H5zg=; h=From:In-Reply-To:Cc:Date:References:To:Subject:Message-ID; b=HfDbo1au9Uaw9Rgd5m5Ya4ShmWru9iNzO3uHbZ+UCg2Vss6BrXIznPa7JyQBxO9BK zkxsoqSFg/gyjmMwwtyGHHG0ubvS03MFObiz320v58mCtyHRGLmXJ22YHerhr9K0DU zT1xC+Rt7k2BKUDzv2ByVxie/nG7/FCnnmCZiZlM= Authentication-Results: mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <3e4a8f82-ea8d-4762-7ab9-85df04ac7c08@yandex.ru> Date: Fri, 31 Mar 2023 20:03:18 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v9 0/13] implement dlmem() function Content-Language: en-US To: Rich Felker Cc: Szabolcs Nagy , Adhemerval Zanella Netto , libc-alpha@sourceware.org, janderson@rice.edu, Carlos O'Donell References: <20230318165110.3672749-1-stsp2@yandex.ru> <20230331144906.GA3298@brightrain.aerifal.cx> <8d59dcc6-ef25-38e3-ab26-a5a5ee76714c@yandex.ru> <20230331145803.GB3298@brightrain.aerifal.cx> From: stsp In-Reply-To: <20230331145803.GB3298@brightrain.aerifal.cx> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 31.03.2023 19:58, Rich Felker пишет: > I'm not going to read this any more than I'm going to watch a YouTube > video about free energy. It's been rehashed over and over why this > does not work. Please just stop. Sorry but it works and lays out an elf segments properly. My test-case has a proof of that: $ LD_LIBRARY_PATH=..:. ./tst-dlmem-fdlopen unaligned buf gives buffer not aligned: Invalid argument 7fb413101000-7fb413102000 r--p 00000000 00:28 17195405 /home/stas/src/glibc-dev/build/dlfcn/glreflib1.so 7fb413102000-7fb413103000 r-xp 00001000 00:28 17195405 /home/stas/src/glibc-dev/build/dlfcn/glreflib1.so 7fb413103000-7fb413104000 r--p 00002000 00:28 17195405 /home/stas/src/glibc-dev/build/dlfcn/glreflib1.so 7fb413104000-7fb413105000 r--p 00002000 00:28 17195405 /home/stas/src/glibc-dev/build/dlfcn/glreflib1.so 7fb413105000-7fb413106000 rw-p 00003000 00:28 17195405 /home/stas/src/glibc-dev/build/dlfcn/glreflib1.so If it didn't work, there would be only 1 reference to the solib. But after dlmem, in this test-case there are 5. This proves that the elf was laid out correctly per vaddr's.