aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2014-11-23 18:12:56 -0800
committerPaul Pluzhnikov <ppluzhnikov@google.com>2014-11-23 18:12:56 -0800
commitc4273619e14873ad7b9b0f41917622dd63ae379d (patch)
tree5f8ec126ae2c346ce06ef88f925552e57280eb78
parent98337c55dbad460c5f8c2939b7d2fab3df60b140 (diff)
downloadglibc-c4273619e14873ad7b9b0f41917622dd63ae379d.zip
glibc-c4273619e14873ad7b9b0f41917622dd63ae379d.tar.gz
glibc-c4273619e14873ad7b9b0f41917622dd63ae379d.tar.bz2
Fix arm build by only using _itoa when building ld-linux, and not 'sln'. Also disable __google_dlopen_with_offset in fully-static link
-rw-r--r--README.google6
-rw-r--r--dlfcn/dlopen.c19
-rw-r--r--elf/dl-load.c4
3 files changed, 11 insertions, 18 deletions
diff --git a/README.google b/README.google
index a4a32aa..9bf2fbf 100644
--- a/README.google
+++ b/README.google
@@ -395,3 +395,9 @@ include/link.h
For b/18243822, fix dlopen_with_offset to not reuse the same link_map
entry when called on the same file with different offsets.
(ppluzhnikov, google-local)
+
+dlfcn/dlopen.c
+elf/dl-load.c
+ To fix AARCH64 build, make code added to dl-load.c in previous CL
+ conditional on SHARED. Disable dlopen_with_offet in fully-static links.
+ (ppluzhnikov, google-local)
diff --git a/dlfcn/dlopen.c b/dlfcn/dlopen.c
index 50f545d..485e907 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
@@ -99,23 +92,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 (__builtin_expect (_dlfcn_hook != NULL, 0))
return _dlfcn_hook->dlopen_with_offset (file, offset, mode, DL_CALLER);
-# endif
-
- struct dlopen_args args;
- args.file = file;
- args.offset = offset;
- args.mode = mode;
- args.caller = DL_CALLER;
-
- return __dlopen_common (&args);
}
-# 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 8adb07f..f7e8bb3 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1065,6 +1065,9 @@ _dl_map_object_from_fd (const char *name, int fd, off_t offset,
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
@@ -1081,6 +1084,7 @@ _dl_map_object_from_fd (const char *name, int fd, off_t offset,
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,