From: Stephen Thomas <scjthm@live.com>
To: "musl@lists.openwall.com" <musl@lists.openwall.com>
Subject: RE: Linking musl with ld.gold
Date: Wed, 7 May 2014 10:04:24 +0100 [thread overview]
Message-ID: <SNT146-W32DB9B6A04FAFB7131CC5CA84E0@phx.gbl> (raw)
In-Reply-To: <20140506231807.GQ12324@port70.net>
[-- Attachment #1.1: Type: text/plain, Size: 1938 bytes --]
>
> 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
Ok, thanks for that info. It appears that there is a problem in gcc 4.9 and not 4.8.3. Come to think of it this I only noticed the prompt being wrong when using gcc 4.9. I will check this with the git version of gcc also. I attach the code also.
This is from 4.8************************************************************Running with ...gcc (Gentoo 4.8.2-r1 p1.4-ssptest, pie-0.5.9-ssptest) 4.8.2Copyright (C) 2013 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Case A: 42************************************************************ar: creating a.a
a.o:0000000000000000 r dummy0000000000000000 T f0000000000000000 V hasfoo
b.o:0000000000000000 d foo0000000000000000 T g0000000000000000 R hasfooCase B: 42************************************************************
and this is from 4.9************************************************************Running with ...x86_64-buildroot-linux-musl-gcc (Buildroot 2014.05-git-00965-gf077df0-dirty) 4.9.0Copyright (C) 2014 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Case A: 0************************************************************ar: creating a.a
a.o:0000000000000000 r dummy0000000000000000 T f0000000000000000 V hasfoo
b.o:0000000000000000 d foo0000000000000000 T g0000000000000000 R hasfooCase B: 0************************************************************
[-- Attachment #1.2: Type: text/html, Size: 2829 bytes --]
[-- Attachment #2: badgcc.sh --]
[-- Type: application/x-sh, Size: 1283 bytes --]
next prev parent reply other threads:[~2014-05-07 9:04 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
2014-05-07 9:04 ` Stephen Thomas [this message]
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=SNT146-W32DB9B6A04FAFB7131CC5CA84E0@phx.gbl \
--to=scjthm@live.com \
--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).