mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: Linking musl with ld.gold
Date: Wed, 7 May 2014 01:18:08 +0200	[thread overview]
Message-ID: <20140506231807.GQ12324@port70.net> (raw)
In-Reply-To: <SNT146-W38F973B7F18DE315F2B15FA84F0@phx.gbl>

* Stephen Thomas <scjthm@live.com> [2014-05-06 22:11:32 +0100]:
> I think that I have managed to reproduce the problem, in as much isolation as possible. I believe that there is a missing step in your test, which is included in the build, and that is the creation of the archive. I may have done something incorrect also, which is also very likely.
> I attach a simple script for running the tests on my machine. Unfortunately, the system I use doesn't display indicate where ld.gold was being used as it chooses to do this by changing the symlink to which ld points to.
> To summari(s/z)e when using ar to create an archive the weak symbol doesn't appear to be overridden, using either ld.bfd nor ld.gold. The script that was used to generate the output is attached and this should describe the 4 test cases. Test case #2 is probably irrelevant, and the first two are simply reproducing the results of your tests.


only the object files with referenced symbols are linked from an archive

so only a.o with the given main.o because of the symbol f

now if you make some reference in main.c such that b.o should
be included but main still returns 0 that would be a bug

eg. add a void g(void){} to b.c and call it from main.c


  reply	other threads:[~2014-05-06 23:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-06  9:07 Stephen Thomas
2014-05-06 10:14 ` Szabolcs Nagy
2014-05-06 21:11   ` Stephen Thomas
2014-05-06 23:18     ` Szabolcs Nagy [this message]
2014-05-07  9:04       ` Stephen Thomas
2014-05-07 10:04         ` Timo Teras
2014-05-08  0:03           ` Stephen Thomas
2014-05-08  1:06           ` Rich Felker
2014-05-08  2:08             ` Stephen Thomas
2014-05-08  3:01               ` Rich Felker
2014-05-08  5:11             ` Timo Teras
2014-05-08  5:18               ` Rich Felker

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=20140506231807.GQ12324@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).