From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8552 invoked from network); 11 Apr 2022 14:04:18 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 11 Apr 2022 14:04:18 -0000 Received: (qmail 10185 invoked by uid 550); 11 Apr 2022 14:04:10 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 10150 invoked from network); 11 Apr 2022 14:04:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=DL715xab5Z5cbDvaTBEdedpsUriWh6bbjlhkbQvu2BM=; b=ELeYJwqzap9PbkOpfAbmrIkvqhGYqEFZtHgjDYx8pS3fm9BsFJz1xW/DOD9bN+mV2D HCeEpUSNaE4BIqwjBWmd3E30eo/f3WODRQtpKe8d1DKOyVCmzZOyIrUghTwg//pJ40fG QzjWsAJ6RPURrJtmHvQZkgmeWhg+pl+YpKYbiXyc1OBS1QnnIHmKwEZZBap3MppDNPFc mMy9TUAOx+qUTDVI9JP5g0ohMgqMBZwoyT5GynPS34kb5y8THlWiuoTrBNHscyw5hAaY Ii20SFUHf+FwjcoiOec6zqKukzd2rUfWaCfAtZC1MeL4Rigehb3NxxMMtgqBUzMDKA87 m5kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=DL715xab5Z5cbDvaTBEdedpsUriWh6bbjlhkbQvu2BM=; b=qcf6BenD+mv8EFU/V6QgnwTx+HmjDhLYN0/fpeCQR4F+J3CgVH7b0lYheeWfsMX8GC 5gC8UJ+B8x3Acd01ZNVgOuCt1V8r1H05q1PK32+e1xhGDPTUa/APaoUDnz/TOxiJ007A tWqrYxtWi9AWn8OUwqRGcxGbRnKvdvSs4t9lHYtjsNOJe2txCYWAApbXVegXq2PG0UJv hZUTMx5XuBXCgYMQrIg88ZMnNnkS8bySAXut9NfBSgCFRJEsYOwOIL18UUYnCVHTSJxD AFTGyH6YAQqFYq9JPIdQBTF/hgyFVEiuN3OEpIp828gZShAroGV3kCSOKVV8j7sbUvIb JW+A== X-Gm-Message-State: AOAM532azoaDCptWbuUA1vU2CU8t6Gempjp9kuBwwN79AlkJfAsdAh9A MgsVb3w0d8WFhNmHjJ5Gg8SlofFH7fD/RbJ2F8Y= X-Google-Smtp-Source: ABdhPJw6ieBr1oLLf5YM+VYSbzU+9iG+7uV4Mc7Aop/gz5daenGvZ5r6v5UwCmsaJxYZkkPaf8+zE4CQIxI4brPYBsc= X-Received: by 2002:ac2:4c4a:0:b0:46b:b09b:8e3f with SMTP id o10-20020ac24c4a000000b0046bb09b8e3fmr1151365lfk.121.1649685838494; Mon, 11 Apr 2022 07:03:58 -0700 (PDT) MIME-Version: 1.0 References: <20220405031859.17673-1-ccross@google.com> <20220411124218.GP7074@brightrain.aerifal.cx> In-Reply-To: <20220411124218.GP7074@brightrain.aerifal.cx> From: Jeffrey Walton Date: Mon, 11 Apr 2022 10:03:47 -0400 Message-ID: To: Rich Felker Cc: musl@lists.openwall.com, Colin Cross Content-Type: text/plain; charset="UTF-8" Subject: Re: [musl] [PATCH] dl_iterate_phdr: return empty string for the name of the main program On Mon, Apr 11, 2022 at 8:42 AM Rich Felker wrote: > > On Mon, Apr 11, 2022 at 08:24:21AM -0400, Jeffrey Walton wrote: > > On Mon, Apr 4, 2022 at 11:57 PM Michael Forney wrote: > > > > > > ... > > > > Use a constant empty string instead of the DSO name field for the first > > > > entry in the DSO list. > > > > > > I believe glibc is the exception here, not musl. When I looked at > > > this, every other operating system I tried used the program name for > > > the first object. > > > > I may be splitting hairs, but the dl_iterate_phdr(3) man page does not > > say a program is returned during the enumeration. It says shared > > objects are returned. > > You are. The intent, actual practice -- and absolute necessity for > this function to serve its purpose, which includes admiting the > implementation of exception handling -- is that it be included. And in > this context, the (dynamic linked) program *is* a shared object. I think you are conflating ET_DYN with a shared object. The presence of ET_DYN does not make a program a shared object, it merely means the object is relocatable (i.e., position independent code). Jeff