public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/maskray/grte] For b/20141439, don't add "foo.so" as alternate name for previously loaded "foo.so/@0x..."
@ 2021-08-27 23:24 Fangrui Song
  0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2021-08-27 23:24 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=85dc56b95f371996e6930e1e56f6071f118a64ba

commit 85dc56b95f371996e6930e1e56f6071f118a64ba
Author: Paul Pluzhnikov <ppluzhnikov@google.com>
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<offset> should be the *only*
+	     name for this object. b/20141439.  */
+	  add_name_to_object (l, name);
 
 	return l;
       }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-27 23:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 23:24 [glibc/maskray/grte] For b/20141439, don't add "foo.so" as alternate name for previously loaded "foo.so/@0x..." Fangrui Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).