From: Paul Pluzhnikov Date: Mon, 24 Nov 2014 02:12:56 +0000 (-0800) Subject: Fix arm build by only using _itoa when building ld-linux, and not 'sln'. Also disable... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf93513721608bab943c2dc964617ec7ec5dab75;p=thirdparty%2Fglibc.git 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 --git a/dlfcn/dlopen.c b/dlfcn/dlopen.c index 319ae6ef2ea..c35a9eb66b2 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 b6c4aa8da02..3aa581692d9 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);