public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/google/grte/v5-2.27/master] Fix arm build by only using _itoa when building ld-linux, and not 'sln'. Also disable __google_dlope
@ 2021-08-28 0:40 Fangrui Song
0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2021-08-28 0:40 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cf93513721608bab943c2dc964617ec7ec5dab75
commit cf93513721608bab943c2dc964617ec7ec5dab75
Author: Paul Pluzhnikov <ppluzhnikov@google.com>
Date: Sun Nov 23 18:12:56 2014 -0800
Fix arm build by only using _itoa when building ld-linux, and not 'sln'. Also disable __google_dlopen_with_offset in fully-static link
Diff:
---
dlfcn/dlopen.c | 19 +------------------
elf/dl-load.c | 4 ++++
2 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/dlfcn/dlopen.c b/dlfcn/dlopen.c
index 319ae6ef2e..c35a9eb66b 100644
--- a/dlfcn/dlopen.c
+++ b/dlfcn/dlopen.c
@@ -33,13 +33,6 @@ dlopen (const char *file, int mode)
static_link_warning (dlopen)
#endif
-void *
-dlopen_with_offset (const char *file, off_t offset, int mode)
-{
- return __dlopen_with_offset (file, offset, mode, RETURN_ADDRESS (0));
-}
-static_link_warning (dlopen_with_offset)
-
#else
struct dlopen_args
@@ -97,23 +90,13 @@ __dlopen_common (struct dlopen_args *args)
# endif
}
+# ifdef SHARED
void *
__dlopen_with_offset (const char *file, off_t offset, int mode DL_CALLER_DECL)
{
-# ifdef SHARED
if (!rtld_active ())
return _dlfcn_hook->dlopen_with_offset (file, offset, mode, DL_CALLER);
-# endif
-
- struct dlopen_args oargs;
- oargs.file = file;
- oargs.offset = offset;
- oargs.mode = mode;
- oargs.caller = DL_CALLER;
-
- return __dlopen_common (&oargs);
}
-# ifdef SHARED
strong_alias (__dlopen_with_offset, __google_dlopen_with_offset)
# endif
diff --git a/elf/dl-load.c b/elf/dl-load.c
index b6c4aa8da0..3aa581692d 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -948,6 +948,9 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, off_t of
else
assert (r->r_state == RT_ADD);
+#ifdef SHARED
+ // This code could be linked into 'sln', which does not have _itoa.
+ // We only care about this when this is linked into ld-linux.
if (offset != 0)
{
/* Google-specific: to help GDB, and for b/18243822, turn realname
@@ -964,6 +967,7 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, off_t of
tmp[19] = '\0';
strcat(realname, _itoa(offset, &tmp[18], 16, 0));
}
+#endif
/* Enter the new object in the list of loaded objects. */
l = _dl_new_object (realname, (offset ? realname : name), l_type, loader, mode, nsid);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-28 0:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-28 0:40 [glibc/google/grte/v5-2.27/master] Fix arm build by only using _itoa when building ld-linux, and not 'sln'. Also disable __google_dlope 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).