From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7814) id 83E1F3857C78; Sat, 28 Aug 2021 00:41:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83E1F3857C78 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Fangrui Song To: glibc-cvs@sourceware.org Subject: [glibc/google/grte/v5-2.27/master] For b/20141439, don't add "foo.so" as alternate name for previously loaded "foo.so/@0x..." X-Act-Checkin: glibc X-Git-Author: Paul Pluzhnikov X-Git-Refname: refs/heads/google/grte/v5-2.27/master X-Git-Oldrev: 60cdb6bb4eff1447d41b7ebb6cd523042fdd1cc4 X-Git-Newrev: 85dc56b95f371996e6930e1e56f6071f118a64ba Message-Id: <20210828004108.83E1F3857C78@sourceware.org> Date: Sat, 28 Aug 2021 00:41:08 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Aug 2021 00:41:08 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=85dc56b95f371996e6930e1e56f6071f118a64ba commit 85dc56b95f371996e6930e1e56f6071f118a64ba Author: Paul Pluzhnikov Date: Fri Oct 2 07:31:16 2015 -0700 For b/20141439, don't add "foo.so" as alternate name for previously loaded "foo.so/@0x..." Diff: --- elf/dl-load.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/elf/dl-load.c b/elf/dl-load.c index 1afaddff2a..20be545401 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -850,7 +850,10 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, off_t of /* If the name is not in the list of names for this object add it. */ free (realname); - add_name_to_object (l, name); + if (offset == 0) + /* If offset!=0, foo.so/@0x should be the *only* + name for this object. b/20141439. */ + add_name_to_object (l, name); return l; }