This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Incorrect IFUNC use in libpthread for fork, vfork wrapper [BZ #19861]


On 04/11/2016 11:57 AM, Andreas Schwab wrote:
Florian Weimer <fweimer@redhat.com> writes:

I removed it, built a special libdofork.so which has a DT_NEEDED entry for
libpthread.so.0 only,

Did you build libdofork before removing the wrapper?

Yes, I did, and I linked explicitly with -lpthread. After that, I patched out the DT_NEEDED entry:

Dynamic segment contains 31 entries:
Addr: 0x0000000000200db8 Offset: 0x000db8 Link to section: [ 4] '.dynstr'
  Type              Value
  NEEDED            Shared library: [libpthread.so.0]
  <unknown>: 0xff   0x000000000000008c

However, the symbol version is stilled mapped to libc.so.6:

Version symbols section [ 5] '.gnu.version' contains 14 entries:
Addr: 0x000000000000043a Offset: 0x00043a Link to section: [ 3] '.dynsym'
    0:   0 *local*                        0 *local*
    2:   0 *local*                        0 *local*
    4:   0 *local*                        0 *local*
    6:   2 GLIBC_2.2.5(libc.so.6)         2 GLIBC_2.2.5(libc.so.6)
    8:   1 *global*                       1 *global*
   10:   1 *global*                       1 *global*
   12:   1 *global*                       1 *global*

Version needs section [ 6] '.gnu.version_r' contains 1 entry:
Addr: 0x0000000000000458 Offset: 0x000458 Link to section: [ 4] '.dynstr'
  000000: Version: 1  File: libc.so.6  Cnt: 1
  0x0010: Name: GLIBC_2.2.5  Flags: none  Version: 2

I don't know how t get rid of that.

Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]