[Bug 1341569] Re: Shared libraries built with multiple tocs resolve plt to local function entry

bugproxy bugproxy at us.ibm.com
Thu Oct 9 15:49:34 UTC 2014


------- Comment From thierry.fauck at fr.ibm.com 2014-10-09 15:48 EDT-------
According to upstream bug https://sourceware.org/bugzilla/show_bug.cgi?id=17153 it will be integrated to release 2.20.
Currently we are running:
$ dpkg -l |grep libc6
ii  libc6:ppc64el                          2.19-10ubuntu2                       ppc64el      GNU C Library: Shared libraries
ii  libc6-dbg:ppc64el                      2.19-10ubuntu2                       ppc64el      GNU C Library: detached debugging symbols
ii  libc6-dev:ppc64el                      2.19-10ubuntu2                       ppc64el      GNU C Library: Development Libraries and Header Files

and glibc-2.19$ head ChangeLog
2014-06-03  Guo Yixuan  <culu.gyx at gmail.com>

[BZ #16882]
* nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S
(pthread_spin_lock): Branch out of spin loop to proper location.
* nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S
(pthread_spin_lock): Likewise.

* nptl/tst-spin4.c: New test.
* nptl/Makefile (tests): Add tst-spin4.

so patch is not yet integrated.

** Bug watch added: Sourceware.org Bugzilla #17153
   http://sourceware.org/bugzilla/show_bug.cgi?id=17153

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/1341569

Title:
  Shared libraries built with multiple tocs resolve plt to local
  function entry

Status in “glibc” package in Ubuntu:
  New

Bug description:
  -- Problem Description --
  An optimisation in glibc is supposed to make calls within a shared library go to the local entry points, when DT_PPC64_OPT does *not* have bit 2 (PPC64_OPT_MULTI_TOC) set.  See glibc/sysdeps/powerpc/powerpc64/dl-machine.h:ppc64_local_entry_offset.

  Libraries correctly have the bit set, but glibc *is* applying the
  local offset.

  When I look at the l_info in question, I see
  p ((struct link_map *) 0x3fffb7f925d8)->l_info
  $6 = {0x0, 0x3fffb7edaf58, 0x3fffb7edb028, 0x3fffb7edb018, 0x3fffb7edafc8, 
    0x3fffb7edafd8, 0x3fffb7edafe8, 0x3fffb7edb078, 0x3fffb7edb088, 
    0x3fffb7edb098, 0x3fffb7edaff8, 0x3fffb7edb008, 0x3fffb7edaf68, 
    0x3fffb7edaf78, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3fffb7edb038, 0x0, 0x0, 
    0x3fffb7edb048, 0x0, 0x3fffb7edaf88, 0x3fffb7edafa8, 0x3fffb7edaf98, 
    0x3fffb7edafb8, 0x0, 0x0, 0x0, 0x0, 0x0,
  -------
    0x3fffb7edb058, 0x0, 0x0, 0x3fffb7edb0b8,
  -------
    0x3fffb7edb0a8, 0x0, 0x0, 0x0, 0x0, 0x3fffb7edb0d8, 0x0, 
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3fffb7edb0c8, 0x0 <repeats 26 times>}

  Highlighted part is the DT_PPC64 area, with DT_PPC64_OPT being the
  last one.  It should be "0x2", but is overwritten with some other
  value due to DT_PPC64_NUM being one too small in the following from
  elf.h.

  /* PowerPC64 specific values for the Dyn d_tag field.  */
  #define DT_PPC64_GLINK  (DT_LOPROC + 0)
  #define DT_PPC64_OPD    (DT_LOPROC + 1)
  #define DT_PPC64_OPDSZ  (DT_LOPROC + 2)
  #define DT_PPC64_OPT    (DT_LOPROC + 3)
  #define DT_PPC64_NUM    3

  Fix applied for upstream bug https://sourceware.org/bugzilla/show_bug.cgi?id=17153
  git revision f6c44d47

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1341569/+subscriptions



More information about the foundations-bugs mailing list