Hello community, here is the log from the commit of package glibc checked in at Fri Sep 29 17:03:50 CEST 2006. -------- --- glibc/glibc.changes 2006-09-27 14:59:57.000000000 +0200 +++ /mounts/work_src_done/STABLE/glibc/glibc.changes 2006-09-29 05:07:07.000000000 +0200 @@ -1,0 +2,7 @@ +Fri Sep 29 04:27:40 CEST 2006 - pbaudis@suse.cz + +- Make the dynamic linker support direct bindings (Michael Meeks' + Solaris-like -Bdirect with minor changes by me) +- Split the kernel headers to a new package (linux-kernel-headers) + +------------------------------------------------------------------- @@ -6,0 +14,10 @@ +Tue Sep 26 18:10:38 CEST 2006 - pbaudis@suse.cz + +- Fix mistake when removing some patches + +------------------------------------------------------------------- +Mon Sep 25 21:15:15 CEST 2006 - pbaudis@suse.cz + +- Update to current CVS + +------------------------------------------------------------------- Old: ---- create_biarch_asm.sh glibc-2.3.3-glob-stack.diff glibc-2.4-fchownat.diff glibc-2.4.90-2006092200.tar.bz2 glibc-2.4.90-enqmutex-64clean.diff glibc-nptl-2.4.90-2006092200.tar.bz2 kernel-headers-2.6.17.tar.bz2 kernel-headers.SuSE.diff kernel-headers.dif setupbuild.sh version.h New: ---- glibc-2.4.90-2006092518.tar.bz2 glibc-2.4.90-bdirect.diff glibc-nptl-2.4.90-2006092518.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ glibc.spec ++++++ --- /var/tmp/diff_new_pack.RV1E2X/_old 2006-09-29 16:57:36.000000000 +0200 +++ /var/tmp/diff_new_pack.RV1E2X/_new 2006-09-29 16:57:36.000000000 +0200 @@ -28,18 +28,15 @@ Obsoletes: ngpt ngpt-devel Autoreqprov: on Version: 2.4.90 -Release: 18 -%define snapshot_date 2006092200 +Release: 19 +%define snapshot_date 2006092518 URL: http://www.gnu.org/software/libc/libc.html PreReq: filesystem BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: glibc-%{version}-%{snapshot_date}.tar.bz2 Source1: glibc-nptl-%{version}-%{snapshot_date}.tar.bz2 -Source2: kernel-headers-2.6.17.tar.bz2 Source3: noversion.tar.bz2 Source4: manpages.tar.bz2 -Source6: create_biarch_asm.sh -Source7: version.h Source8: nsswitch.conf Source9: nscd.init Source10: bindresvport.blacklist @@ -54,8 +51,6 @@ Patch4: glibc-2.3.locales.diff.bz2 Patch5: crypt_blowfish-glibc-2.3.diff Patch6: glibc-version.diff -Patch7: kernel-headers.SuSE.diff -Patch8: kernel-headers.dif Patch9: glibc-2.4.90-revert-only-euro.diff Patch10: glibc-2.3-regcomp.diff Patch11: glibc-2.3.2-revert_tcsetattr.diff @@ -79,10 +74,8 @@ Patch30: glibc-2.3.90-langpackdir.diff Patch31: glibc-nptl-2.4-nofixsyscallnr.diff Patch32: crypt_blowfish-1.0.diff -Patch33: glibc-2.4-fchownat.diff -Patch34: glibc-2.3.3-glob-stack.diff -Patch35: glibc-2.4.90-enqmutex-64clean.diff -Patch36: glibc-2.4.90-nscd-initgroups.diff +Patch33: glibc-2.4.90-nscd-initgroups.diff +Patch34: glibc-2.4.90-bdirect.diff %description The GNU C Library provides the most important standard libraries used @@ -181,7 +174,7 @@ Group: Development/Libraries/C and C++ Obsoletes: epoll PreReq: /bin/rm -Requires: glibc = %{version} +Requires: glibc = %{version}, kernel-headers Autoreqprov: on %description devel @@ -209,8 +202,7 @@ %prep -rm -rf kernel-headers -%setup -n glibc-2.4 -q -a 1 -b 2 -a 3 -a 4 -a 14 +%setup -n glibc-2.4 -q -a 1 -a 3 -a 4 -a 14 %patch # libNoVersion part is only active on ix86 %patch1 @@ -247,15 +239,8 @@ %patch32 %patch33 %patch34 -%patch35 -%patch36 %patch5 find . -name configure | xargs touch -cd ../kernel-headers -%patch7 -%patch8 -find . -name "*.orig" -exec rm {} \; -touch asm-ia64/asm-offsets.h %build if [ -x /bin/uname.bin ]; then @@ -266,43 +251,9 @@ uptime || : ulimit -a nice -# Install special version.h -install -m644 $RPM_SOURCE_DIR/version.h ../kernel-headers/linux/version.h # Adjust glibc version.h echo "#define CONFHOST \"%{_target_cpu}-suse-linux\"" >> version.h echo "#define CVSDATE \"`date -r ChangeLog +%Y%m%d`\"" >> version.h -%ifarch sparc sparcv9 sparc64 x86_64 -# Make sure execute permissions don't go lost -chmod 755 $RPM_SOURCE_DIR/create_biarch_asm.sh -$RPM_SOURCE_DIR/create_biarch_asm.sh %{_target_cpu} $RPM_BUILD_ROOT $RPM_BUILD_DIR 1 -%else -%ifarch %ix86 -(cd ../kernel-headers; ln -sf asm-i386 asm) -%else -%ifarch armv4l -(cd ../kernel-headers; ln -sf asm-arm asm; ln -sf proc-armv asm/proc; ln -sf arch-ebsa285 asm/arch) -%else -%ifarch hppa -(cd ../kernel-headers; ln -sf asm-parisc asm) -%else -%ifarch s390 s390x -(cd ../kernel-headers; ln -sf asm-s390 asm) -%else -%ifarch ppc ppc64 -(cd ../kernel-headers; ln -sf asm-powerpc asm) -%else -(cd ../kernel-headers - if [ ! -d asm-%{_target_cpu} ]; then - echo kernel headers for %{_target_cpu} does not exist - exit 1 - fi - ln -sf asm-%{_target_cpu} asm) -%endif -%endif -%endif -%endif -%endif -%endif # # Default CFLAGS and Compiler # @@ -360,7 +311,6 @@ --prefix=%{_prefix} \ --libexecdir=%{_libdir} --infodir=%{_infodir} \ --enable-add-ons=nptl$addons --srcdir=.. --without-cvs \ - --with-headers=$RPM_BUILD_DIR/kernel-headers \ $* \ %if %{enable_stackguard_randomization} --enable-stackguard-randomization \ @@ -465,40 +415,6 @@ # the generic one (RH#162634) # cp -av bits/stdio-lock.h $RPM_BUILD_ROOT%{_prefix}/include/bits/stdio-lock.h -# -# Install kernel-headers -# -rm -f $RPM_BUILD_ROOT/usr/include/asm -# -# Create bi-arch asm headers -# -%ifarch sparc sparcv9 sparc64 x86_64 -chmod 755 $RPM_SOURCE_DIR/create_biarch_asm.sh -$RPM_SOURCE_DIR/create_biarch_asm.sh %{_target_cpu} $RPM_BUILD_ROOT $RPM_BUILD_DIR 0 -%else -# -%ifarch armv4l -cp -a $RPM_BUILD_DIR/kernel-headers/asm-arm $RPM_BUILD_ROOT/usr/include/asm -%else -%ifarch hppa -cp -a $RPM_BUILD_DIR/kernel-headers/asm-parisc $RPM_BUILD_ROOT/usr/include/asm -%else -%ifarch s390 s390x -cp -a $RPM_BUILD_DIR/kernel-headers/asm-s390 $RPM_BUILD_ROOT/usr/include/asm -%else -%ifarch ppc ppc64 -cp -a $RPM_BUILD_DIR/kernel-headers/asm-powerpc $RPM_BUILD_ROOT/usr/include/asm -%else -cp -a $RPM_BUILD_DIR/kernel-headers/asm-$RPM_ARCH $RPM_BUILD_ROOT/usr/include/asm -%endif -%endif -%endif -%endif -%endif -rm -f $RPM_BUILD_ROOT/usr/include/asm-generic -cp -a $RPM_BUILD_DIR/kernel-headers/asm-generic $RPM_BUILD_ROOT/usr/include/ -rm -f $RPM_BUILD_ROOT/usr/include/linux -cp -a $RPM_BUILD_DIR/kernel-headers/linux $RPM_BUILD_ROOT/usr/include/linux %ifarch s390x # # s390x is different ... @@ -882,8 +798,16 @@ %{_libdir}/libdl_p.a %changelog -n glibc +* Fri Sep 29 2006 - pbaudis@suse.cz +- Make the dynamic linker support direct bindings (Michael Meeks' + Solaris-like -Bdirect with minor changes by me) +- Split the kernel headers to a new package (linux-kernel-headers) * Wed Sep 27 2006 - schwab@suse.de - Fix broken assertion [#208189]. +* Tue Sep 26 2006 - pbaudis@suse.cz +- Fix mistake when removing some patches +* Mon Sep 25 2006 - pbaudis@suse.cz +- Update to current CVS * Sat Sep 23 2006 - pbaudis@suse.cz - Fix 64bit-cleanliness gcc warnings * Thu Sep 21 2006 - pbaudis@suse.cz ++++++ glibc-2.4.90-2006092200.tar.bz2 -> glibc-2.4.90-2006092518.tar.bz2 ++++++ glibc/glibc-2.4.90-2006092200.tar.bz2 /mounts/work_src_done/STABLE/glibc/glibc-2.4.90-2006092518.tar.bz2 differ: char 11, line 1 ++++++ glibc-2.4.90-bdirect.diff ++++++ diff --git a/elf/dl-close.c b/elf/dl-close.c index 6a2ad97..e1f7226 100644 --- elf/dl-close.c +++ elf/dl-close.c @@ -569,6 +569,9 @@ #endif /* Remove the searchlists. */ free (imap->l_initfini); + /* Remove the dtneeded list. */ + free (imap->l_dtneeded.r_list); + /* Remove the scope array if we allocated it. */ if (imap->l_scope != imap->l_scope_mem) free (imap->l_scope); diff --git a/elf/dl-deps.c b/elf/dl-deps.c index c35cc97..31cf705 100644 --- elf/dl-deps.c +++ elf/dl-deps.c @@ -39,6 +39,10 @@ #define AUXTAG (DT_NUM + DT_THISPROCNUM #define FILTERTAG (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \ + DT_EXTRATAGIDX (DT_FILTER)) +#ifndef SUSEIDX +# define SUSEIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM + \ + DT_EXTRANUM + DT_VALNUM + DT_ADDRNUM + DT_SUSE_TAGIDX (sym)) +#endif /* When loading auxiliary objects we must ignore errors. It's ok if an object is missing. */ @@ -139,6 +143,65 @@ cannot load auxiliary `%s' because of em __result; }) +static void +setup_direct (struct link_map *map, struct r_scope_elem *scope) +{ + if (map->l_info[SUSEIDX(DT_SUSE_DIRECT)] && map->l_info[DT_NEEDED]) + { + const ElfW(Dyn) *d; + unsigned int i; + const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); + + if (GLRO(dl_debug_mask) & DL_DEBUG_DIRECT) + _dl_debug_printf ("** direct linkage section in '%s' **\n", + map->l_name ? map->l_name : "<null>"); + + map->l_dtneeded.r_nlist = 1; + for (d = map->l_ld; d->d_tag != DT_NULL; ++d) + { + if (__builtin_expect (d->d_tag, DT_NEEDED) == DT_NEEDED) + map->l_dtneeded.r_nlist++; + } + + map->l_dtneeded.r_list = (struct link_map **) + malloc (map->l_dtneeded.r_nlist * sizeof (struct link_map *)); + + map->l_dtneeded.r_list[0] = map; + for (i = 1, d = map->l_ld; d->d_tag != DT_NULL; ++d) + { + const char *name; + unsigned int j; + + if (d->d_tag != DT_NEEDED) + continue; + + name = expand_dst (map, strtab + d->d_un.d_val, 0); + if (GLRO(dl_debug_mask) & DL_DEBUG_DIRECT) + _dl_debug_printf (" direct index %u object '%s'\n", i, name); + for (j = 0; j < scope->r_nlist; j++) + { + if (scope->r_list[j] && + _dl_name_match_p (name, scope->r_list[j])) + { + map->l_dtneeded.r_list[i] = scope->r_list[j]; + break; + } + } + if (!map->l_dtneeded.r_list[i]) + _dl_debug_printf (" direct binding: impossible error - can't find '%s' in my scope\n", name); + i++; + } + } + else + { + if (GLRO(dl_debug_mask) & DL_DEBUG_DIRECT) + _dl_debug_printf ("no direct linkage section in '%s'\n", + map->l_name ? map->l_name : "<null>"); + map->l_dtneeded.r_nlist = 0; + map->l_dtneeded.r_list = NULL; + } +} + void internal_function _dl_map_object_deps (struct link_map *map, @@ -566,6 +629,20 @@ Filters not supported with LD_TRACE_PREL } } + if (__builtin_expect (GLRO(dl_direct), 1) && npreloads == 0) + { + /* Setup direct linkage dtneeded table. */ + for (i = 0; i < nlist; ++i) + setup_direct (map->l_searchlist.r_list[i], &map->l_searchlist); + } + else + { + if (GLRO(dl_debug_mask) & DL_DEBUG_DIRECT) + _dl_debug_printf (" no dl_direct set %u\n", GLRO(dl_direct)); + map->l_dtneeded.r_nlist = 0; + map->l_dtneeded.r_list = NULL; + } + /* Maybe we can remove some relocation dependencies now. */ assert (map->l_searchlist.r_list[0] == map); for (i = 0; i < map->l_reldepsact; ++i) diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index 7cfcc62..41f38fe 100644 --- elf/dl-lookup.c +++ elf/dl-lookup.c @@ -32,6 +32,11 @@ #include <assert.h> #define VERSTAG(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (tag)) +#ifndef SUSEIDX +# define SUSEIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM + \ + DT_EXTRANUM + DT_VALNUM + DT_ADDRNUM + DT_SUSE_TAGIDX (sym)) +#endif + /* We need this string more than once. */ static const char undefined_msg[] = "undefined symbol: "; @@ -220,6 +225,7 @@ _dl_lookup_symbol_x (const char *undef_n unsigned long int old_hash = 0xffffffff; struct sym_val current_value = { NULL, NULL }; struct r_scope_elem **scope = symbol_scope; + size_t i = 0; bump_num_relocations (); @@ -227,7 +233,85 @@ _dl_lookup_symbol_x (const char *undef_n up a versioned symbol. */ assert (version == NULL || flags == 0 || flags == DL_LOOKUP_ADD_DEPENDENCY); - size_t i = 0; + if (__builtin_expect (undef_map != NULL, 1) && + __builtin_expect (undef_map->l_dtneeded.r_nlist != 0, 0) && + __builtin_expect (*ref != NULL, 1)) + { + unsigned int idx, noffset; + const ElfW(Sym) *symtab; + ElfW(Addr) direct; + + /* We need a dynsym index. */ + symtab = (const void *) D_PTR (undef_map, l_info[DT_SYMTAB]); + direct = D_PTR (undef_map, l_info[SUSEIDX(DT_SUSE_DIRECT)]); + + idx = *ref - symtab; + if (__builtin_expect ((GLRO(dl_debug_mask) & DL_DEBUG_DIRECT) != 0, 0)) + _dl_debug_printf ("dynamic symbol index %u from '%s' for %s base direct 0x%x start 0x%x\n", idx, + undef_map->l_name ? undef_map->l_name : "<noname>", + undef_name ? undef_name : "<undef>", + (int) direct, (int) undef_map->l_map_start); + direct += idx * 2; + if (direct >= undef_map->l_map_end || direct <= undef_map->l_map_start) + _dl_debug_printf ("Warning: ignoring invalid out-of-map direct binding for symbol %s: 0x%x\n", + undef_name ? undef_name : "<undef>", + (int) direct); + else + { + noffset = *(uint16_t *)direct; + if (__builtin_expect ((GLRO(dl_debug_mask) & DL_DEBUG_DIRECT) != 0, 0)) + _dl_debug_printf ("dynamic symbol offset %u from 0x%x\n", noffset, (int) direct); + if (noffset & DT_SUSE_DIRECT_VAGUE) + { + if (__builtin_expect ((GLRO(dl_debug_mask) & DL_DEBUG_DIRECT) != 0, 0)) + _dl_debug_printf ("vague symbol\n"); + goto normal_lookup; + } + + noffset &= DT_SUSE_DIRECT_MASK; + + if (__builtin_expect (noffset < undef_map->l_dtneeded.r_nlist / sizeof(void *), 1)) + { + int res; + struct r_scope_elem direct_elem; + + direct_elem.r_list = undef_map->l_dtneeded.r_list + noffset; + direct_elem.r_nlist = 1; + + /* If we are doing RTLD_NEXT, continue scope search after this. */ + if (__builtin_expect (direct_elem.r_list[0] == skip_map, 0)) + goto normal_lookup; + + res = do_lookup_x (undef_name, new_hash, &old_hash, *ref, + ¤t_value, &direct_elem, 0, version, flags, + skip_map, type_class); + if (res > 0) + { + if (__builtin_expect ((GLRO(dl_debug_mask) & DL_DEBUG_DIRECT) != 0, 0)) + _dl_debug_printf ("direct lookup ...\n"); + goto match; + } + else + _dl_debug_printf ("Warning: unresolved direct binding for symbol '%s' (error %u)\n", + undef_name ? undef_name : "<undef>", + res); + } + else if (noffset == DT_SUSE_DIRECT_UNKNOWN) + { + if (__builtin_expect ((GLRO(dl_debug_mask) & DL_DEBUG_DIRECT) != 0, 0)) + _dl_debug_printf ("unknown/undefined symbol '%s'\n", + undef_name ? undef_name : "<undef>"); + } + else + { + _dl_debug_printf ("Warning: ignoring invalid out-of-range direct binding for symbol '%s': %u < %u\n", + undef_name ? undef_name : "<undef>", + noffset, undef_map->l_dtneeded.r_nlist); + } + } + } + normal_lookup: + if (__builtin_expect (skip_map != NULL, 0)) { /* Search the relevant loaded objects for a definition. */ @@ -240,9 +324,12 @@ _dl_lookup_symbol_x (const char *undef_n /* Search the relevant loaded objects for a definition. */ for (size_t start = i; *scope != NULL; start = 0, ++scope) { + /***** DT_SUSE_DIRECT conflict marker *****/ int res = do_lookup_x (undef_name, new_hash, &old_hash, *ref, ¤t_value, *scope, start, version, flags, skip_map, type_class); + /* To make sure that if this changes we will notice and update the + * call above. */ if (res > 0) break; @@ -270,7 +357,7 @@ _dl_lookup_symbol_x (const char *undef_n return 0; } } - + match: if (__builtin_expect (current_value.s == NULL, 0)) { if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK) diff --git a/elf/dl-support.c b/elf/dl-support.c index c3b6350..01c2d9e 100644 --- elf/dl-support.c +++ elf/dl-support.c @@ -41,6 +41,7 @@ size_t _dl_platformlen; int _dl_debug_mask; int _dl_lazy; +int _dl_direct; int _dl_madvise; ElfW(Addr) _dl_use_load_bias = -2; int _dl_dynamic_weak; @@ -240,6 +241,8 @@ _dl_non_dynamic_init (void) _dl_lazy = *(getenv ("LD_BIND_NOW") ?: "") == '\0'; + _dl_direct = *(getenv ("LD_BIND_NO_DIRECT") ?: "") != '\0'; + _dl_bind_not = *(getenv ("LD_BIND_NOT") ?: "") != '\0'; _dl_dynamic_weak = *(getenv ("LD_DYNAMIC_WEAK") ?: "") == '\0'; diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h index 7eb9a36..2b8e393 100644 --- elf/dynamic-link.h +++ elf/dynamic-link.h @@ -65,6 +65,10 @@ #include <dl-machine.h> #ifndef VERSYMIDX # define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym)) #endif +#ifndef SUSEIDX +# define SUSEIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM + \ + DT_EXTRANUM + DT_VALNUM + DT_ADDRNUM + DT_SUSE_TAGIDX (sym)) +#endif /* Read the dynamic section at DYN and fill in INFO with indices DT_*. */ @@ -93,6 +97,9 @@ #endif else if (dyn->d_tag >= DT_LOPROC && dyn->d_tag < DT_LOPROC + DT_THISPROCNUM) info[dyn->d_tag - DT_LOPROC + DT_NUM] = dyn; + else if (dyn->d_tag >= DT_SUSE_LO && + dyn->d_tag < DT_SUSE_LO + DT_SUSENUM) + info[SUSEIDX(dyn->d_tag)] = dyn; else if ((Elf32_Word) DT_VERSIONTAGIDX (dyn->d_tag) < DT_VERSIONTAGNUM) info[VERSYMIDX (dyn->d_tag)] = dyn; else if ((Elf32_Word) DT_EXTRATAGIDX (dyn->d_tag) < DT_EXTRANUM) @@ -143,6 +150,8 @@ # if ! ELF_MACHINE_NO_REL # endif ADJUST_DYN_INFO (DT_JMPREL); ADJUST_DYN_INFO (VERSYMIDX (DT_VERSYM)); + ADJUST_DYN_INFO (SUSEIDX (DT_SUSE_HASHVALS)); + ADJUST_DYN_INFO (SUSEIDX (DT_SUSE_DIRECT)); ADJUST_DYN_INFO (DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM); # undef ADJUST_DYN_INFO diff --git a/elf/elf.h b/elf/elf.h index dae3597..99edc10 100644 --- elf/elf.h +++ elf/elf.h @@ -733,6 +733,14 @@ #define DT_VERNEEDNUM 0x6fffffff /* Numb #define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */ #define DT_VERSIONTAGNUM 16 +/* SUSE specific pieces - at a random OS specific address. */ +#define DT_SUSE_LO 0x6cbdd030 +#define DT_SUSE_HASHVALS DT_SUSE_LO /* Unused and unsupported */ +#define DT_SUSE_DIRECT DT_SUSE_LO + 1 /* Solaris-like direct bindings */ +#define DT_SUSE_HI 0x6cbdd040 +#define DT_SUSE_TAGIDX(tag) (tag - DT_SUSE_LO) +#define DT_SUSENUM 2 + /* Sun added these machine-independent extensions in the "processor-specific" range. Be compatible. */ #define DT_AUXILIARY 0x7ffffffd /* Shared object to load before self */ @@ -747,6 +755,11 @@ #define DF_TEXTREL 0x00000004 /* Object #define DF_BIND_NOW 0x00000008 /* No lazy binding for this object */ #define DF_STATIC_TLS 0x00000010 /* Module uses the static TLS model */ +/* Constants for the DT_SUSE_DIRECT entries. */ +#define DT_SUSE_DIRECT_VAGUE (1<<15) +#define DT_SUSE_DIRECT_MASK 0xfff +#define DT_SUSE_DIRECT_UNKNOWN DT_SUSE_DIRECT_MASK + /* State flags selectable in the `d_un.d_val' element of the DT_FLAGS_1 entry in the dynamic section. */ #define DF_1_NOW 0x00000001 /* Set RTLD_NOW for this object. */ diff --git a/elf/rtld.c b/elf/rtld.c index 9a21b8b..e61e2f6 100644 --- elf/rtld.c +++ elf/rtld.c @@ -150,6 +150,7 @@ #endif ._dl_correct_cache_id = _DL_CACHE_DEFAULT_ID, ._dl_hwcap_mask = HWCAP_IMPORTANT, ._dl_lazy = 1, + ._dl_direct = 1, ._dl_fpu_control = _FPU_DEFAULT, ._dl_pointer_guard = 1, @@ -2391,11 +2392,13 @@ #define LEN_AND_STR(str) sizeof (str) - DL_DEBUG_SYMBOLS | DL_DEBUG_IMPCALLS }, { LEN_AND_STR ("bindings"), "display information about symbol binding", DL_DEBUG_BINDINGS | DL_DEBUG_IMPCALLS }, + { LEN_AND_STR ("direct"), "display information about direct binding", + DL_DEBUG_DIRECT | DL_DEBUG_IMPCALLS }, { LEN_AND_STR ("versions"), "display version dependencies", DL_DEBUG_VERSIONS | DL_DEBUG_IMPCALLS }, { LEN_AND_STR ("all"), "all previous options combined", DL_DEBUG_LIBS | DL_DEBUG_RELOC | DL_DEBUG_FILES | DL_DEBUG_SYMBOLS - | DL_DEBUG_BINDINGS | DL_DEBUG_VERSIONS | DL_DEBUG_IMPCALLS }, + | DL_DEBUG_BINDINGS | DL_DEBUG_DIRECT | DL_DEBUG_VERSIONS | DL_DEBUG_IMPCALLS }, { LEN_AND_STR ("statistics"), "display relocation statistics", DL_DEBUG_STATISTICS }, { LEN_AND_STR ("unused"), "determined unused DSOs", @@ -2632,7 +2635,12 @@ #endif if (!INTUSE(__libc_enable_secure) && memcmp (envline, "PROFILE_OUTPUT", 14) == 0 && envline[15] != '\0') - GLRO(dl_profile_output) = &envline[15]; + { + GLRO(dl_profile_output) = &envline[15]; + break; + } + if (memcmp (envline, "BIND_NO_DIRECT", 14) == 0) + GLRO(dl_direct) = envline[15] == '\0'; break; case 16: diff --git a/include/link.h b/include/link.h index 0d6b661..f521a81 100644 --- include/link.h +++ include/link.h @@ -117,10 +117,12 @@ struct link_map indexed by DT_VALTAGIDX(tagvalue) and [DT_NUM+DT_THISPROCNUM+DT_VERSIONTAGNUM+DT_EXTRANUM+DT_VALNUM, DT_NUM+DT_THISPROCNUM+DT_VERSIONTAGNUM+DT_EXTRANUM+DT_VALNUM+DT_ADDRNUM) - are indexed by DT_ADDRTAGIDX(tagvalue), see <elf.h>. */ + are indexed by DT_ADDRTAGIDX(tagvalue), see <elf.h>. + [DT_NUM+DT_THISPROCNUM+DT_VERSIONTAGNUM+DT_EXTRANUM+DT_VALNUM+DT_ADDRNUM+ + DT_SUSENUM] is indexed by DT_SUSE_TAGIDX(tagvalue), see <elf.h>. */ ElfW(Dyn) *l_info[DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM - + DT_EXTRANUM + DT_VALNUM + DT_ADDRNUM]; + + DT_EXTRANUM + DT_VALNUM + DT_ADDRNUM + DT_SUSENUM]; const ElfW(Phdr) *l_phdr; /* Pointer to program header table in core. */ ElfW(Addr) l_entry; /* Entry point location. */ ElfW(Half) l_phnum; /* Number of program header entries. */ @@ -284,6 +286,10 @@ #endif ElfW(Addr) l_relro_addr; size_t l_relro_size; + /* Array of DT_NEEDED dependencies in order for use in + direct linkage - l_dtneeded[0] entry is self. */ + struct r_scope_elem l_dtneeded; + /* Audit information. This array apparent must be the last in the structure. Never add something after it. */ struct auditstate diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index b7d0f9b..f2c4b46 100644 --- sysdeps/generic/ldsodefs.h +++ sysdeps/generic/ldsodefs.h @@ -542,6 +542,7 @@ #define DL_DEBUG_UNUSED (1 << 8) /* These two are used only internally. */ #define DL_DEBUG_HELP (1 << 9) #define DL_DEBUG_PRELINK (1 << 10) +#define DL_DEBUG_DIRECT (1 << 11) /* Cached value of `getpagesize ()'. */ EXTERN size_t _dl_pagesize; @@ -567,6 +568,9 @@ #define DL_DEBUG_PRELINK (1 << 10) /* Do we do lazy relocations? */ EXTERN int _dl_lazy; + /* Do we do direct relocations? */ + EXTERN int _dl_direct; + /* Nonzero if runtime lookups should not update the .got/.plt. */ EXTERN int _dl_bind_not; diff --git a/elf/dl-dst.h b/elf/dl-dst.h index 83d16bd..d93796e 100644 --- elf/dl-dst.h +++ elf/dl-dst.h @@ -50,7 +50,7 @@ #define DL_DST_REQUIRED(l, name, len, cn \ First get the origin string if it is not available yet. \ This can only happen for the map of the executable. */ \ - DL_DST_REQ_STATIC \ + DL_DST_REQ_STATIC(l) \ if ((l)->l_origin == NULL) \ { \ assert ((l)->l_name[0] == '\0'); \ @@ -68,9 +68,9 @@ #define DL_DST_REQUIRED(l, name, len, cn __len; }) #ifdef SHARED -# define DL_DST_REQ_STATIC /* nothing */ +# define DL_DST_REQ_STATIC(l) /* nothing */ #else -# define DL_DST_REQ_STATIC \ +# define DL_DST_REQ_STATIC(l) \ if ((l) == NULL) \ { \ const char *origin = _dl_get_origin (); \ ++++++ glibc-nptl-2.4.90-2006092200.tar.bz2 -> glibc-nptl-2.4.90-2006092518.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/ChangeLog new/nptl/ChangeLog --- old/nptl/ChangeLog 2006-09-20 13:53:31.000000000 +0200 +++ new/nptl/ChangeLog 2006-09-25 18:41:33.000000000 +0200 @@ -1,3 +1,9 @@ +2006-09-24 Ulrich Drepper <drepper@redhat.com> + + [BZ #3251] + * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning. + Patch by Petr Baudis. + 2006-09-18 Jakub Jelinek <jakub@redhat.com> * tst-kill4.c (do_test): Explicitly set tf thread's stack size. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nptl/descr.h new/nptl/descr.h --- old/nptl/descr.h 2006-09-20 13:53:31.000000000 +0200 +++ new/nptl/descr.h 2006-09-25 18:41:33.000000000 +0200 @@ -201,7 +201,7 @@ mutex->__data.__list.__next \ = THREAD_GETMEM (THREAD_SELF, robust_list.__next); \ THREAD_SETMEM (THREAD_SELF, robust_list.__next, \ - ((uintptr_t) &mutex->__data.__list) | val); \ + (void *) (((uintptr_t) &mutex->__data.__list) | val)); \ } while (0) # define DEQUEUE_MUTEX(mutex) \ do { \ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@suse.de