Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libc++ leakage when building with MKLLVM=yes



While testing MKREPRO builds, by oversight I built one version with
MKLLVM=yes and one without. (I didn't set HAVE_LLVM in either build.)

I noticed because the list of installed files and the mtree contents
differed -- so far, so good.

However, /usr/lib/libproc.so.0.0 also has a non-trivial difference.
>From the diffoscope output:

--- /archive/build/mkrepro/build-20151221-1/amd64.gcc.20151221/usr/lib/libproc.so.0.0
+++ /archive/build/mkrepro/build-20151221-2/amd64.gcc.20151221/usr/lib/libproc.so.0.0
├── readelf -W -all {}
│ @@ -20,17 +20,17 @@
│    Section header string table index: 32
│
│  Section Headers:
│    [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
│    [ 0]                   NULL            0000000000000000 000000 000000 00      0   0  0
│    [ 1] .hash             HASH            0000000000000158 000158 00024c 04   A  2   0  8
│    [ 2] .dynsym           DYNSYM          00000000000003a8 0003a8 000750 18   A  3   2  8
│ -  [ 3] .dynstr           STRTAB          0000000000000af8 000af8 0003b0 00   A  0   0  1
│ -  [ 4] .rela.dyn         RELA            0000000000000ea8 000ea8 000078 18   A  2   0  8
│ -  [ 5] .rela.plt         RELA            0000000000000f20 000f20 0004c8 18   A  2   7  8
│ +  [ 3] .dynstr           STRTAB          0000000000000af8 000af8 0003b3 00   A  0   0  1
│ +  [ 4] .rela.dyn         RELA            0000000000000eb0 000eb0 000078 18   A  2   0  8
│ +  [ 5] .rela.plt         RELA            0000000000000f28 000f28 0004c8 18   A  2   7  8
│    [ 6] .init             PROGBITS        00000000000013f0 0013f0 00000e 00  AX  0   0 16
│    [ 7] .plt              PROGBITS        0000000000001400 001400 000340 10  AX  0   0 16
│    [ 8] .text             PROGBITS        0000000000001740 001740 001a9c 00  AX  0   0 16
│    [ 9] .fini             PROGBITS        00000000000031e0 0031e0 00000e 00  AX  0   0 16
│    [10] .rodata           PROGBITS        00000000000031f0 0031f0 00009e 00   A  0   0  8
│    [11] .eh_frame_hdr     PROGBITS        0000000000003290 003290 000154 00   A  0   0  4
│    [12] .eh_frame         PROGBITS        00000000000033e8 0033e8 0008c8 00   A  0   0  8
│ @@ -78,46 +78,46 @@
│     02     .dynamic
│     03     .note.netbsd.ident .note.netbsd.pax
│     04     .eh_frame_hdr
│
│  Dynamic section at offset 0x4028 contains 23 entries:
│    Tag        Type                         Name/Value
│   0x0000000000000001 (NEEDED)             Shared library: [libctf.so.3]
│ - 0x0000000000000001 (NEEDED)             Shared library: [libc++.so.1]
│ + 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.7]
│   0x0000000000000001 (NEEDED)             Shared library: [libelf.so.1]
│   0x0000000000000001 (NEEDED)             Shared library: [librtld_db.so.0]
│   0x0000000000000001 (NEEDED)             Shared library: [libutil.so.7]
│   0x0000000000000001 (NEEDED)             Shared library: [libc.so.12]
│   0x000000000000000e (SONAME)             Library soname: [libproc.so.0]
│   0x000000000000000c (INIT)               0x13f0
│   0x000000000000000d (FINI)               0x31e0
│   0x0000000000000004 (HASH)               0x158
│   0x0000000000000005 (STRTAB)             0xaf8
│   0x0000000000000006 (SYMTAB)             0x3a8

Or looking at it with ldd:
# ldd /archive/build/mkrepro/build-20151221-1/amd64.gcc.20151221/usr/lib/libproc.so.0.0 /archive/build/mkrepro/build-20151221-2/amd64.gcc.20151221/usr/lib/libproc.so.0.0
/archive/build/mkrepro/build-20151221-1/amd64.gcc.20151221/usr/lib/libproc.so.0.0:
        -lctf.3 => /usr/lib/libctf.so.3
        -lz.1 => /usr/lib/libz.so.1
        -lc.12 => /usr/lib/libc.so.12
        -lc++.1 => /usr/lib/libc++.so.1
        -lelf.1 => /usr/lib/libelf.so.1
        -lrtld_db.0 => /usr/lib/librtld_db.so.0
        -lutil.7 => /usr/lib/libutil.so.7
/archive/build/mkrepro/build-20151221-2/amd64.gcc.20151221/usr/lib/libproc.so.0.0:
        -lctf.3 => /usr/lib/libctf.so.3
        -lz.1 => /usr/lib/libz.so.1
        -lc.12 => /usr/lib/libc.so.12
        -lstdc++.7 => /usr/lib/libstdc++.so.7
        -lm.0 => /usr/lib/libm.so.0
        -lelf.1 => /usr/lib/libelf.so.1
        -lrtld_db.0 => /usr/lib/librtld_db.so.0
        -lutil.7 => /usr/lib/libutil.so.7

So the MKLLVM build links libproc against libc++, while the non-MKLLVM
one links it against libstdc++.

This looks like a bug to me. It should link against libstdc++ in both
cases.

Am I overlooking something?
 Thomas



Home | Main Index | Thread Index | Old Index