This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH roland/ehdr_start] Use __ehdr_start, when available, for rtld to get its own headers.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: Siddhesh Poyarekar <siddhesh dot poyarekar at gmail dot com>, "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Mon, 17 Mar 2014 16:01:35 -0700 (PDT)
- Subject: Re: [PATCH roland/ehdr_start] Use __ehdr_start, when available, for rtld to get its own headers.
- Authentication-results: sourceware.org; auth=none
- References: <20140311222933 dot CC24274474 at topped-with-meat dot com> <CAAHN_R13tXB1XyUOTEpLAABpvP7FCnbqa-7-c5kx7XHY8--rGA at mail dot gmail dot com> <20140317200749 dot A65E874461 at topped-with-meat dot com> <5327774A dot 3000609 at redhat dot com>
> I see this on f19 build systems.
I'm not testing random distro-hacked tools nor any specific binutils
versions not from sourceware release branches.
I tested binutils-2_24-branch and it was fine.
I tested binutils-2_23-branch and it shows the problem you see.
It's good that I was especially looking for this particular failure,
because someone broke the tree so that 'make check-abi' claims it succeeded
after there were some failures. (I've just posted about that, and I really
really hope those responsible fix their blunder before I look at libc again
tomorrow.)
> --- ../sysdeps/unix/sysv/linux/x86_64/64/nptl/ld.abilist 2014-03-14 13:44:46.788247781 -0400
> +++ /home/carlos/build/glibc-wundef/elf/ld.symlist 2014-03-17 01:17:11.841818363 -0400
> @@ -0,0 +1,2 @@
> +Base
> +__ehdr_start Base g ? D .hash 0000000000000000
>
> ...
> Symbol table '.dynsym' contains 29 entries:
> Num: Value Size Type Bind Vis Ndx Name
> 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
> 1: 0000000000000ab0 0 SECTION LOCAL DEFAULT 10
> 2: 0000000000000000 0 NOTYPE GLOBAL HIDDEN 1 __ehdr_start
It's a binutils bug that it appears there, but it is actually harmless.
(Any STV_HIDDEN symbol appearing in .dynsym is useless but harmless.)
We could try to make the configure check for __ehdr_start support reject
binutils versions that have this bug. But that would be to check for
something that is not really directly material to what the check is really
for.
Alternatively, we could make abilist.awk ignore hidden symbols.
A change for that is on roland/abilist-hidden and below, but
I don't have time to test it today. If it works and you like it,
just merge the branch.
Thanks,
Roland
2014-03-17 Roland McGrath <roland@hack.frob.com>
* scripts/abilist.awk: Ignore symbols marked with .hidden.
--- a/scripts/abilist.awk
+++ b/scripts/abilist.awk
@@ -48,6 +48,10 @@ $2 == "g" || $2 == "w" && (NF == 7 || NF == 8) {
symbol = $NF;
gsub(/[()]/, "", version);
+ # binutils versions up through at least 2.23 have some bugs that
+ # caused STV_HIDDEN symbols to appear in .dynsym, though that is useless.
+ if (NF > 7 && $7 == ".hidden") next;
+
if (version == "GLIBC_PRIVATE") next;
desc = "";