From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Roland McGrath <roland@hack.frob.com>
Cc: <libc-alpha@sourceware.org>, <libc-ports@sourceware.org>
Subject: Re: Link extra-libs consistently with libc and ld.so
Date: Fri, 17 May 2013 22:56:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1305172247530.22690@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20130517214158.D73C02C0C4@topped-with-meat.com>
[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]
On Fri, 17 May 2013, Roland McGrath wrote:
> > No, tested with normal testsuite runs. I don't expect everything to be
> > unchanged, given that various objects were previously linked
> > unconditionally with ld.so and after the patch have a --as-needed link
> > with ld.so (so some may not end up with a dependency on ld.so after all).
>
> I'd like to see at least verification that no actual code changed, and
> diffs of readelf -d output where it changed.
With the revised patch I'm currently testing, for an x86_64 build, the .so
files that change are libSegFault, libanl, libmemusage, libnss_db,
libpcprofile and librt.
For libanl, libmemusage and libnss_db, there are no code changes and the
only changes in readelf -d output are a reordering of DT_NEEDED entries.
For the others, an ld.so dependency disappears. This reduces the size of
the dynamic section. Lots of offsets change in code, probably as a result
of this, making comparisons hard. See attached diffs of readelf -d and
objdump -d output.
For an i386 build, in addition to the changes described above the
DT_NEEDED entries for libm are also reordered (with, again, no code
changes).
--
Joseph S. Myers
joseph@codesourcery.com
[-- Attachment #2: Type: text/plain, Size: 8425 bytes --]
lib64/libSegFault.so:
--- /dev/fd/63 2013-05-17 22:47:46.418962180 +0000
+++ /dev/fd/62 2013-05-17 22:47:46.418962180 +0000
@@ -1,27 +1,26 @@
-Dynamic section at offset 0x3e00 contains 24 entries:
+Dynamic section at offset 0x3e10 contains 23 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
- 0x0000000000000001 (NEEDED) Shared library: [ld-linux-x86-64.so.2]
0x000000000000000e (SONAME) Library soname: [libSegFault.so]
- 0x000000000000000c (INIT) 0xb58
- 0x000000000000000d (FINI) 0x31a8
- 0x0000000000000004 (HASH) 0x3550
+ 0x000000000000000c (INIT) 0xb40
+ 0x000000000000000d (FINI) 0x3198
+ 0x0000000000000004 (HASH) 0x3540
0x000000006ffffef5 (GNU_HASH) 0x258
0x0000000000000005 (STRTAB) 0x5f8
0x0000000000000006 (SYMTAB) 0x2b0
- 0x000000000000000a (STRSZ) 478 (bytes)
+ 0x000000000000000a (STRSZ) 457 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000003 (PLTGOT) 0x204000
0x0000000000000002 (PLTRELSZ) 504 (bytes)
0x0000000000000014 (PLTREL) RELA
- 0x0000000000000017 (JMPREL) 0x960
- 0x0000000000000007 (RELA) 0x870
+ 0x0000000000000017 (JMPREL) 0x948
+ 0x0000000000000007 (RELA) 0x858
0x0000000000000008 (RELASZ) 240 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000000000001e (FLAGS) STATIC_TLS
- 0x000000006ffffffe (VERNEED) 0x820
+ 0x000000006ffffffe (VERNEED) 0x808
0x000000006fffffff (VERNEEDNUM) 1
- 0x000000006ffffff0 (VERSYM) 0x7d6
+ 0x000000006ffffff0 (VERSYM) 0x7c2
0x000000006ffffff9 (RELACOUNT) 2
0x0000000000000000 (NULL) 0x0
lib64/libanl-2.17.90.so:
--- /dev/fd/63 2013-05-17 22:47:46.418962180 +0000
+++ /dev/fd/62 2013-05-17 22:47:46.418962180 +0000
@@ -1,8 +1,8 @@
Dynamic section at offset 0x2de0 contains 26 entries:
Tag Type Name/Value
- 0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
+ 0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000e (SONAME) Library soname: [libanl.so.1]
0x000000000000000c (INIT) 0xc88
0x000000000000000d (FINI) 0x1f80
lib64/libmemusage.so:
--- /dev/fd/63 2013-05-17 22:47:46.418962180 +0000
+++ /dev/fd/62 2013-05-17 22:47:46.418962180 +0000
@@ -2,8 +2,8 @@
Dynamic section at offset 0x3de0 contains 25 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
- 0x0000000000000001 (NEEDED) Shared library: [ld-linux-x86-64.so.2]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
+ 0x0000000000000001 (NEEDED) Shared library: [ld-linux-x86-64.so.2]
0x000000000000000e (SONAME) Library soname: [libmemusage.so]
0x000000000000000c (INIT) 0xd70
0x000000000000000d (FINI) 0x2688
lib64/libnss_db-2.17.90.so:
--- /dev/fd/63 2013-05-17 22:47:46.422961993 +0000
+++ /dev/fd/62 2013-05-17 22:47:46.422961993 +0000
@@ -1,8 +1,8 @@
Dynamic section at offset 0x6de0 contains 26 entries:
Tag Type Name/Value
- 0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [libnss_files.so.2]
+ 0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000e (SONAME) Library soname: [libnss_db.so.2]
0x000000000000000c (INIT) 0x1698
0x000000000000000d (FINI) 0x5058
lib64/libpcprofile.so:
--- /dev/fd/63 2013-05-17 22:47:46.422961993 +0000
+++ /dev/fd/62 2013-05-17 22:47:46.422961993 +0000
@@ -1,27 +1,26 @@
-Dynamic section at offset 0xe10 contains 24 entries:
+Dynamic section at offset 0xe20 contains 23 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
- 0x0000000000000001 (NEEDED) Shared library: [ld-linux-x86-64.so.2]
0x000000000000000e (SONAME) Library soname: [libpcprofile.so]
- 0x000000000000000c (INIT) 0x798
- 0x000000000000000d (FINI) 0xa98
- 0x0000000000000004 (HASH) 0xba0
+ 0x000000000000000c (INIT) 0x788
+ 0x000000000000000d (FINI) 0xa88
+ 0x0000000000000004 (HASH) 0xb90
0x000000006ffffef5 (GNU_HASH) 0x258
0x0000000000000005 (STRTAB) 0x498
0x0000000000000006 (SYMTAB) 0x2b8
- 0x000000000000000a (STRSZ) 319 (bytes)
+ 0x000000000000000a (STRSZ) 298 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000003 (PLTGOT) 0x201000
0x0000000000000002 (PLTRELSZ) 144 (bytes)
0x0000000000000014 (PLTREL) RELA
- 0x0000000000000017 (JMPREL) 0x708
- 0x0000000000000007 (RELA) 0x630
+ 0x0000000000000017 (JMPREL) 0x6f8
+ 0x0000000000000007 (RELA) 0x620
0x0000000000000008 (RELASZ) 216 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000000000001e (FLAGS) STATIC_TLS
- 0x000000006ffffffe (VERNEED) 0x600
+ 0x000000006ffffffe (VERNEED) 0x5f0
0x000000006fffffff (VERNEEDNUM) 1
- 0x000000006ffffff0 (VERSYM) 0x5d8
+ 0x000000006ffffff0 (VERSYM) 0x5c2
0x000000006ffffff9 (RELACOUNT) 3
0x0000000000000000 (NULL) 0x0
lib64/librt-2.17.90.so:
--- /dev/fd/63 2013-05-17 22:47:46.422961993 +0000
+++ /dev/fd/62 2013-05-17 22:47:46.422961993 +0000
@@ -1,31 +1,30 @@
-Dynamic section at offset 0x6d98 contains 28 entries:
+Dynamic section at offset 0x6da8 contains 27 entries:
Tag Type Name/Value
- 0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
- 0x0000000000000001 (NEEDED) Shared library: [ld-linux-x86-64.so.2]
+ 0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000e (SONAME) Library soname: [librt.so.1]
- 0x000000000000000c (INIT) 0x1f40
- 0x000000000000000d (FINI) 0x52e4
- 0x0000000000000004 (HASH) 0x6208
+ 0x000000000000000c (INIT) 0x1f38
+ 0x000000000000000d (FINI) 0x52d4
+ 0x0000000000000004 (HASH) 0x61f8
0x000000006ffffef5 (GNU_HASH) 0x258
0x0000000000000005 (STRTAB) 0x1058
0x0000000000000006 (SYMTAB) 0x500
- 0x000000000000000a (STRSZ) 1442 (bytes)
+ 0x000000000000000a (STRSZ) 1421 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000003 (PLTGOT) 0x207000
0x0000000000000002 (PLTRELSZ) 1392 (bytes)
0x0000000000000014 (PLTREL) RELA
- 0x0000000000000017 (JMPREL) 0x19d0
- 0x0000000000000007 (RELA) 0x1838
+ 0x0000000000000017 (JMPREL) 0x19c8
+ 0x0000000000000007 (RELA) 0x1830
0x0000000000000008 (RELASZ) 408 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
- 0x000000006ffffffc (VERDEF) 0x16f0
+ 0x000000006ffffffc (VERDEF) 0x16d8
0x000000006ffffffd (VERDEFNUM) 6
0x000000000000001e (FLAGS) STATIC_TLS
0x000000006ffffffb (FLAGS_1) Flags: NODELETE
- 0x000000006ffffffe (VERNEED) 0x17b8
+ 0x000000006ffffffe (VERNEED) 0x17a0
0x000000006fffffff (VERNEEDNUM) 2
- 0x000000006ffffff0 (VERSYM) 0x15fa
+ 0x000000006ffffff0 (VERSYM) 0x15e6
0x000000006ffffff9 (RELACOUNT) 5
0x0000000000000000 (NULL) 0x0
[-- Attachment #3: Type: application/octet-stream, Size: 100512 bytes --]
next prev parent reply other threads:[~2013-05-17 22:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-09 0:22 Joseph S. Myers
2013-05-10 0:01 ` David Holsgrove
2013-05-14 0:32 ` Joseph S. Myers
2013-05-14 1:12 ` Roland McGrath
2013-05-17 20:24 ` Roland McGrath
2013-05-17 21:36 ` Joseph S. Myers
2013-05-17 21:42 ` Roland McGrath
2013-05-17 22:56 ` Joseph S. Myers [this message]
2013-05-17 23:12 ` Roland McGrath
2013-05-17 23:19 ` Joseph S. Myers
2013-05-28 23:58 ` Roland McGrath
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.1305172247530.22690@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=libc-ports@sourceware.org \
--cc=roland@hack.frob.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).