]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix arm build by only using _itoa when building ld-linux, and not 'sln'. Also disable...
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Mon, 24 Nov 2014 02:12:56 +0000 (18:12 -0800)
committerPaul Pluzhnikov <ppluzhnikov@google.com>
Mon, 24 Nov 2014 02:12:56 +0000 (18:12 -0800)
README.google
dlfcn/dlopen.c
elf/dl-load.c

index a4a32aa47880eb2784ef20fa47b96e68f9b14240..9bf2fbfbc8a5b95340224b64ac74e5e4a8ebcb82 100644 (file)
@@ -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)
index 50f545dd512e0b9e0c75a2f2c63cd5c9ac75f156..485e907ae3768699fc0ec15c06f50ea6dc86cac9 100644 (file)
@@ -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
 
index 8adb07fde33f45b907f152ab9afde5c104c6d0c8..f7e8bb3077d56d1b7ba588993167c2af62ddc23a 100644 (file)
@@ -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,