OSDN Git Service

Merge remote-tracking branch 'origin/master' into prelink
authorCarmelo Amoroso <carmelo.amoroso@st.com>
Wed, 6 Apr 2011 13:13:59 +0000 (15:13 +0200)
committerCarmelo Amoroso <carmelo.amoroso@st.com>
Wed, 6 Apr 2011 13:13:59 +0000 (15:13 +0200)
* origin/master: (137 commits)
  utils/ldd: Check for returned pointer from strrchr not the value it holds
  cris: add provide arch-specific vfork implementation
  lutimes.c, stubs.c: fix compiling lutimes, if __NR_utimensat is not defined
  bump version to 0.9.32-rc3-git
  release 0.9.32-rc3
  memalign: include sys/param.h for MAX
  arm/bits/atomic.h: Include common/bit/atomic.h for thumb1
  wctype.h: fix libc_hidden_proto for iswupper and add it for iswspace
  add libc_hidden_proto for wcs[n]casecmp_l
  really fix missing __libc_drand48_data
  Revert "missing prototype of __libc_drand48_data fixed"
  missing prototype of __libc_drand48_data fixed
  time.c, time.h: remove unused hidden strftime/strptime
  nanosleep.c: remove duplicated libc_hidden_proto
  ctype.c, ctype.h: remove commented parts that were banned for removal after 0.9.31
  _wctype.c, wctype.h: remove unused isw* and wctype_l hidden functions
  time.c, wchar.h: remove unused hidden wcsftime
  str[n]casecmp.c: fix hidden usage
  remove unused hidden functions
  frv/memset.S: add missing libc_hidden_def
  ...

Conflicts:
ldso/ldso/ldso.c

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
12 files changed:
1  2 
Makerules
extra/Configs/Config.in
ldso/include/dl-defs.h
ldso/include/dl-elf.h
ldso/ldso/Makefile.in
ldso/ldso/dl-elf.c
ldso/ldso/i386/elfinterp.c
ldso/ldso/ldso.c
ldso/ldso/sparc/elfinterp.c
ldso/ldso/x86_64/elfinterp.c
ldso/libdl/libdl.c
libc/misc/internals/__uClibc_main.c

diff --cc Makerules
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1168,95 -954,11 +1166,95 @@@ of this helper program; chances are yo
  # else
        __stack_chk_guard = stack_chk_guard;
  # endif
+ # ifdef __UCLIBC_HAS_SSP_COMPAT__
+       __guard = stack_chk_guard;
+ # endif
  #endif
  
 +#ifdef __LDSO_PRELINK_SUPPORT__
 +      if (_dl_trace_prelink) {
 +
 +              unsigned int nscope_trace = ldso_tpnt ? nscope_elem : (nscope_elem - 1);
 +
 +              for (i = 0; i < nscope_trace; i++)
 +                      trace_objects(scope_elem_list[i],
 +                              _dl_get_last_path_component(scope_elem_list[i]->libname));
 +
 +              if (_dl_verbose)
 +                      /* Warn about undefined symbols. */
 +                      if (_dl_symbol_tables)
 +                              if (_dl_fixup(_dl_symbol_tables, global_scope, unlazy))
 +                                      _dl_exit(-1);
 +              _dl_exit(0);
 +      }
 +
 +      if (_dl_loaded_modules->dynamic_info[DT_GNU_LIBLIST_IDX]) {
 +              ElfW(Lib) *liblist, *liblistend;
 +              struct elf_resolve **r_list, **r_listend, *l;
 +              const char *strtab = (const char *)_dl_loaded_modules->dynamic_info[DT_STRTAB];
 +
 +              _dl_assert (_dl_loaded_modules->dynamic_info[DT_GNU_LIBLISTSZ_IDX] != 0);
 +              liblist = (ElfW(Lib) *) _dl_loaded_modules->dynamic_info[DT_GNU_LIBLIST_IDX];
 +              liblistend = (ElfW(Lib) *)
 +              ((char *) liblist + _dl_loaded_modules->dynamic_info[DT_GNU_LIBLISTSZ_IDX]);
 +              r_list = _dl_loaded_modules->symbol_scope.r_list;
 +              r_listend = r_list + nscope_elem;
 +
 +              for (; r_list < r_listend && liblist < liblistend; r_list++) {
 +                      l = *r_list;
 +
 +                      if (l == _dl_loaded_modules)
 +                              continue;
 +
 +                      /* If the library is not mapped where it should, fail.  */
 +                      if (l->loadaddr)
 +                              break;
 +
 +                      /* Next, check if checksum matches.  */
 +                      if (l->dynamic_info[DT_CHECKSUM_IDX] == 0 ||
 +                              l->dynamic_info[DT_CHECKSUM_IDX] != liblist->l_checksum)
 +                              break;
 +
 +                      if (l->dynamic_info[DT_GNU_PRELINKED_IDX] == 0 ||
 +                              (l->dynamic_info[DT_GNU_PRELINKED_IDX] != liblist->l_time_stamp))
 +                              break;
 +
 +                      if (_dl_strcmp(strtab + liblist->l_name, _dl_get_last_path_component(l->libname)) != 0)
 +                              break;
 +
 +                      ++liblist;
 +              }
 +
 +
 +              if (r_list == r_listend && liblist == liblistend)
 +                      prelinked = true;
 +
 +      }
 +
 +      _dl_debug_early ("\nprelink checking: %s\n", prelinked ? "ok" : "failed");
 +
 +      if (prelinked) {
 +              if (_dl_loaded_modules->dynamic_info[DT_GNU_CONFLICT_IDX]) {
 +                      ELF_RELOC *conflict;
 +                      unsigned long conflict_size;
 +
 +                      _dl_assert (_dl_loaded_modules->dynamic_info[DT_GNU_CONFLICTSZ_IDX] != 0);
 +                      conflict = (ELF_RELOC *) _dl_loaded_modules->dynamic_info[DT_GNU_CONFLICT_IDX];
 +                      conflict_size = _dl_loaded_modules->dynamic_info[DT_GNU_CONFLICTSZ_IDX];
 +                      _dl_parse_relocation_information(_dl_symbol_tables, global_scope,
 +                              (unsigned long) conflict, conflict_size);
 +              }
 +
 +              /* Mark all the objects so we know they have been already relocated.  */
 +              for (tpnt = _dl_loaded_modules; tpnt; tpnt = tpnt->next) {
 +                      tpnt->init_flag |= RELOCS_DONE;
 +                      if (tpnt->relro_size)
 +                              _dl_protect_relro (tpnt);
 +              }
 +      } else
 +#endif
 +
 +      {
  
        _dl_debug_early("Beginning relocation fixups\n");
  
Simple merge
Simple merge
Simple merge
Simple merge