public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: John Marino <dragonflybsd@marino.st>
Cc: binutils@sourceware.org
Subject: Re: gold linker 2.22 regressed for DragonFly [revised testsuite results]
Date: Sun, 22 Jan 2012 19:43:00 -0000	[thread overview]
Message-ID: <mcr7h0j4j76.fsf@dhcp-172-18-216-180.mtv.corp.google.com> (raw)
In-Reply-To: <4F1C5C72.8010905@marino.st> (John Marino's message of "Sun, 22	Jan 2012 19:58:58 +0100")

John Marino <dragonflybsd@marino.st> writes:

>>> Ideally rtld should not have a publically visible definition of
>>> __bss_start, but I don't see how it would cause a test failure even if
>>> it did.
>
>
> After many hours of digging into the issue, I might have an
> explanation for why the __bss_start and _edata symbols are getting
> assigned to the dynamic symbol table.  This is the only test that
> FreeBSD passes and DragonFly doesn't, and the reason for that wasn't
> clear.
>
> Finally using --trace-symbol=__bss_start might have provided a clue.
> It said __bss_start was defined in libc.so, libm.so, and libstdc++.so.
> My guess is that the presence of the symbols in those libraries caused
> gold to promote the __bss_start symbol to global.
>
> As for why FreeBSD doesn't have these symbols in their system
> libraries, the difference might be in their use of symbol version
> maps. Unfortunately DragonFly doesn't yet version their library
> functions, so the lack of version scripts means every library has this
> symbol.
>
> Am I on the right track in diagnosing this test failure?

Sounds like it.  There may be a target independent problem here. What
should the linker do if the version script specifies that a symbol is
local but the symbol is also defined in a shared library?  I think it
has to make the symbol local despite the definitions, but it sounds like
that is not happening.


> I came up with an initial implementation of relro for the dynamic
> linker and FreeBSD's Konstantin Belousov reviewed and added to it.
> Now DragonFly passes these three tests and I think there's a good
> chance that code will get incorporated into FreeBSD as well.

Cool.

Ian

  reply	other threads:[~2012-01-22 19:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-01 22:16 gold linker 2.22 regressed for DragonFly John Marino
2011-12-02  4:59 ` Ian Lance Taylor
2011-12-02  8:44   ` John Marino
2011-12-02 14:28     ` Ian Lance Taylor
2011-12-31 16:40       ` John Marino
2012-01-02  2:05         ` Ian Lance Taylor
2012-01-02  9:36           ` John Marino
2012-01-02 18:38             ` Ian Lance Taylor
2012-01-02 19:27               ` John Marino
2012-01-02 19:48                 ` John Marino
2012-01-02 22:56                   ` John Marino
2012-01-03  9:20                     ` gold linker 2.22 regressed for DragonFly [revised testsuite results] John Marino
2012-01-05 18:32                       ` Ian Lance Taylor
2012-01-06 10:24                         ` John Marino
2012-01-06 14:43                           ` Ian Lance Taylor
2012-01-06 20:04                             ` John Marino
2012-01-22 18:59                               ` John Marino
2012-01-22 19:43                                 ` Ian Lance Taylor [this message]
2012-01-22 20:46                                   ` John Marino
2012-01-23 16:49                                     ` Ian Lance Taylor
2012-01-03 19:43                 ` gold linker 2.22 regressed for DragonFly Ian Lance Taylor
2012-01-05 17:30                   ` John Marino

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=mcr7h0j4j76.fsf@dhcp-172-18-216-180.mtv.corp.google.com \
    --to=iant@google.com \
    --cc=binutils@sourceware.org \
    --cc=dragonflybsd@marino.st \
    /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).