From: Nathan_Lynch@mentor.com (Nathan Lynch)
To: linux-arm-kernel@lists.infradead.org
Subject: Bulid regression with VDSO enabled
Date: Fri, 15 May 2015 12:01:47 -0500 [thread overview]
Message-ID: <5556267B.5070700@mentor.com> (raw)
In-Reply-To: <20150509092626.GM2067@n2100.arm.linux.org.uk>
Sorry for the delay in following up on this.
On 05/09/2015 04:26 AM, Russell King - ARM Linux wrote:
> On Fri, May 08, 2015 at 04:15:25PM -0500, Nathan Lynch wrote:
>> I suppose it's possible to make arch/arm/vdso/Makefile honor LD, but it
>> would basically entail a rewrite. In the meantime, using -fuse-ld=bfd
>> may suffice:
>>
>> diff --git a/arch/arm/vdso/Makefile b/arch/arm/vdso/Makefile
>> index 8aa791051029..da0ce897edde 100644
>> --- a/arch/arm/vdso/Makefile
>> +++ b/arch/arm/vdso/Makefile
>> @@ -43,6 +43,7 @@ quiet_cmd_vdsold = VDSO $@
>> cmd_vdsold = $(CC) $(c_flags) -Wl,-T $(filter %.lds,$^) $(filter %.o,$^) \
>> $(call cc-ldoption, -Wl$(comma)--build-id) \
>> -Wl,-Bsymbolic -Wl,-z,max-page-size=4096 \
>> + $(call cc-option, -fuse-ld=bfd) \
>> -Wl,-z,common-page-size=4096 -o $@
>
> Would it make more sense to have something like:
>
> VDSO_LDFLAGS := -Wl,-Bsymbolic -Wl,-z,max-page-size=4096 \
> -Wl,-z,common-page-size=4096 \
> $(call cc-ldoption, -Wl$(comma)--build-id) \
> $(call cc-option, -fuse-ld=bfd)
>
> and then have:
>
> cmd_vdsold = $(CC) $(c_flags) $(VDSO_LDFLAGS) \
> -Wl,-T $(filter %.lds,$^) $(filter %.o,$^) -o $@
Yes, I can see value in grouping linker directives into one variable;
there are a few in ccflags-y that could be moved to VDSO_LDFLAGS as well.
> Also, do we want to use cc-option or cc-ldoption (this question becomes
> obvious when you arrange the Makefile as I have above...)? cc-option
> doesn't result in the linker actually being run, where as cc-ldoption
> does.
It's a corner case, but cc-option and cc-ldoption result in different
failure modes when gold is the default linker and the bfd linker is not
in $PATH:
With $(call cc-option, -fuse-ld=bfd):
VDSO arch/arm/vdso/vdso.so.raw
collect2: fatal error: cannot find 'ld'
With $(call cc-ldoption, -fuse-ld=bfd):
VDSO arch/arm/vdso/vdso.so.raw
HOSTCC arch/arm/vdso/vdsomunge
MUNGE arch/arm/vdso/vdso.so.dbg
OBJCOPY arch/arm/vdso/vdso.so
BFD: arch/arm/vdso/vdso.so: Not enough room for program headers, try
linking with -N
That is, since using cc-ldoption invokes the linker, and the bfd linker
isn't found, -fuse-ld=bfd is omitted from the command and gold gets run,
resulting in the same symptom as the report that started this thread.
I think the first one gives more of a clue as to what the user can do to
remedy the situation, so that's what I'd slightly prefer.
next prev parent reply other threads:[~2015-05-15 17:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <391d6fc127b78ef4cbc5443557f0665a@agner.ch>
2015-05-08 11:28 ` Bulid regression with VDSO enabled Russell King - ARM Linux
2015-05-08 12:23 ` Stefan Agner
2015-05-08 15:27 ` Nathan Lynch
2015-05-08 16:08 ` Stefan Agner
2015-05-08 21:15 ` Nathan Lynch
2015-05-09 8:31 ` Ard Biesheuvel
2015-05-11 14:18 ` Nathan Lynch
2015-05-09 9:26 ` Russell King - ARM Linux
2015-05-15 17:01 ` Nathan Lynch [this message]
2015-05-09 12:41 ` Stefan Agner
2015-05-09 13:25 ` Stefan Agner
2015-05-11 14:27 ` Nathan Lynch
2015-05-09 9:32 ` Russell King - ARM Linux
2015-04-30 11:44 Stefan Agner
2015-04-30 14:38 ` Nathan Lynch
2015-04-30 15:20 ` Stefan Agner
2015-04-30 15:48 ` Nathan Lynch
2015-04-30 15:58 ` Stefan Agner
2015-05-01 15:22 ` Nathan Lynch
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=5556267B.5070700@mentor.com \
--to=nathan_lynch@mentor.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 NNTP newsgroup(s).