diff mbox

[roland/ehdr_start] Use __ehdr_start, when available, for rtld to get its own headers.

Message ID 20140317230135.5323474466@topped-with-meat.com
State New
Headers show

Commit Message

Roland McGrath March 17, 2014, 11:01 p.m. UTC
> 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.

Comments

Siddhesh Poyarekar March 18, 2014, 4:49 p.m. UTC | #1
On Mon, Mar 17, 2014 at 04:01:35PM -0700, Roland McGrath wrote:
> 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.

I have tested and pushed your patch.

Siddhesh
diff mbox

Patch

--- 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 = "";