From: Richard Guenther <richard.guenther@gmail.com>
To: Richard Earnshaw <rearnsha@arm.com>
Cc: Andrew Haley <aph@redhat.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] ARM: Use different linker path for hardfloat ABI
Date: Tue, 03 Apr 2012 10:51:00 -0000 [thread overview]
Message-ID: <CAFiYyc3sh+YtCRNVnrdu2Ec-sc5cjZcR7BF20xUxJLWQQF1S=A@mail.gmail.com> (raw)
In-Reply-To: <4F7AD4CA.8010000@arm.com>
On Tue, Apr 3, 2012 at 12:45 PM, Richard Earnshaw <rearnsha@arm.com> wrote:
> On 03/04/12 10:29, Andrew Haley wrote:
>> On 04/02/2012 10:06 PM, dann frazier wrote:
>>> On Fri, Mar 30, 2012 at 06:52:34PM +0100, Richard Earnshaw wrote:
>>>> On 29/03/12 20:34, dann frazier wrote:
>>>>> This is an updated version of a patch Debian and Ubuntu are using to
>>>>> use an alternate linker path for hardfloat binaries. The difference
>>>>> with this one is that it covers the case where no float flag
>>>>> was passed in, defaulting to the softfloat path.
>>>>>
>>>>> 2012-03-29 dann frazier <dann.frazier@canonical.com>
>>>>>
>>>>> * config/arm/linux-elf.h: Use alternate linker path
>>>>> for hardfloat ABI
>>>>>
>>>>> Index: gcc/config/arm/linux-elf.h
>>>>> ===================================================================
>>>>> --- gcc/config/arm/linux-elf.h (revision 185708)
>>>>> +++ gcc/config/arm/linux-elf.h (working copy)
>>>>> @@ -59,14 +59,21 @@
>>>>>
>>>>> #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
>>>>>
>>>>> -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
>>>>> +#define LINUX_DYNAMIC_LINKER_SF "/lib/ld-linux.so.3"
>>>>> +#define LINUX_DYNAMIC_LINKER_HF "/lib/arm-linux-gnueabihf/ld-linux.so.3"
>>>>>
>>>>> #define LINUX_TARGET_LINK_SPEC "%{h*} \
>>>>> %{static:-Bstatic} \
>>>>> %{shared:-shared} \
>>>>> %{symbolic:-Bsymbolic} \
>>>>> %{rdynamic:-export-dynamic} \
>>>>> - -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \
>>>>> + %{msoft-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_SF "} \
>>>>> + %{mfloat-abi=soft*:-dynamic-linker " LINUX_DYNAMIC_LINKER_SF "} \
>>>>> + %{mhard-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_HF "} \
>>>>> + %{mfloat-abi=hard:-dynamic-linker " LINUX_DYNAMIC_LINKER_HF "} \
>>>>> + %{!mfloat-abi: \
>>>>> + %{!msoft-float: \
>>>>> + %{!mhard-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_SF "}}} \
>>>>> -X \
>>>>> %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
>>>>> SUBTARGET_EXTRA_LINK_SPEC
>>>>>
>>>>
>>>> Looks to me as though this will break the old Linux ABI. While we've
>>>> marked that as deprecated, it hasn't been removed as yet. So I think
>>>> this patch either needs to wait until that removal has taken place, or
>>>> provide the relevant updates to maintain the old ABI support.
>>>
>>> Thanks for your review. You're right, this does appear to break the
>>> old ABI - that was a misunderstanding on my part. I think this fixes
>>> the problem:
>>
>> But what about those of us who are using hard-float but not the
>> Debian liker path? It'll break, surely. This looks to be like
>> it's Debian-specific.
>>
>
> Are you trying to tell me that some distros are using /lib/ld-linux.so.3
> directly for hard-float? Sigh, you distro guys need to start talking to
> each other, rather than just going of inventing things ...
>
> If, so then there's only one way to sort out this mess.
>
> /lib/arm-linux-gnueabi/ld-linux.so.3 Location of soft-float loader
> /lib/arm-linux-gnueabihf/ld-linux.so.3 Location of hard-float loader
> /lib/ld-linux.so.3 legacy symlink to one of the above.
>
> Or something of this nature.
>
> All this is outside of GCC's remit though and I'm not in a position to
> drive any of it through.
>
> :-( :-( :-(
Now, I wonder why the dynamic linker cannot figure out the ABI itself
by means of using ELF flags or so?
Richard.
> R.
>
>
next prev parent reply other threads:[~2012-04-03 10:51 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-29 19:34 dann frazier
2012-03-30 17:52 ` Richard Earnshaw
2012-04-02 21:07 ` dann frazier
2012-04-03 3:29 ` Michael Hope
2012-04-03 14:31 ` dann frazier
2012-04-03 22:56 ` Joseph S. Myers
2012-04-04 2:40 ` Michael Hope
2012-04-04 9:06 ` Joseph S. Myers
2012-04-04 12:10 ` Dennis Gilmore
2012-04-05 13:30 ` Konstantinos Margaritis
2012-04-05 14:13 ` Niels de Vos
2012-04-05 15:09 ` Mike Frysinger
2012-04-05 15:24 ` Konstantinos Margaritis
2012-04-05 15:55 ` Mike Frysinger
2012-04-05 16:25 ` Konstantinos Margaritis
2012-04-10 4:10 ` Mike Frysinger
2012-04-05 16:16 ` Steve McIntyre
2012-04-05 17:36 ` Mike Frysinger
2012-04-04 23:33 ` Michael Hope
2012-04-05 0:07 ` Joseph S. Myers
2012-04-05 1:17 ` Michael Hope
2012-04-05 16:05 ` Steve McIntyre
2012-04-05 16:03 ` Steve McIntyre
2012-04-05 1:32 ` dann frazier
2012-04-05 14:57 ` Steve McIntyre
2012-04-10 20:31 ` Carlos O'Donell
2012-04-03 9:29 ` Andrew Haley
2012-04-03 10:46 ` Richard Earnshaw
2012-04-03 10:51 ` Richard Guenther [this message]
2012-04-03 10:55 ` Richard Earnshaw
2012-04-04 8:59 ` Andrew Haley
2012-04-03 11:02 ` Jakub Jelinek
2012-04-03 16:10 ` Richard Earnshaw
2012-04-03 16:18 ` Andrew Haley
2012-04-03 21:19 ` Michael Hope
2012-04-03 23:12 ` Jakub Jelinek
2012-04-03 23:49 ` Michael Hope
2012-04-04 0:00 ` Peter Robinson
2012-04-04 0:56 ` Paulo César Pereira de Andrade
2012-04-04 1:35 ` Michael Hope
2012-04-04 6:54 ` Jakub Jelinek
2012-04-04 9:16 ` Joseph S. Myers
2012-04-04 22:51 ` Michael Hope
2012-04-09 20:48 ` Adam Conrad
2012-04-09 23:14 ` Mike Frysinger
2012-04-09 23:31 ` Adam Conrad
2012-04-10 4:01 ` Mike Frysinger
2012-04-10 5:17 ` Adam Conrad
2012-04-10 5:36 ` Jakub Jelinek
2012-04-10 9:19 ` Konstantinos Margaritis
2012-04-10 14:35 ` Dennis Gilmore
2012-04-10 15:14 ` Konstantinos Margaritis
2012-04-10 15:39 ` Steve McIntyre
2012-04-11 12:06 ` Jeff Law
2012-04-10 6:17 ` Jeff Law
2012-04-10 16:47 ` Michael Edwards
2012-04-11 3:15 ` Mike Frysinger
2012-04-11 17:22 ` Michael K. Edwards
2012-04-11 3:08 ` Mike Frysinger
2012-04-10 4:17 ` Jeff Law
2012-04-10 4:43 ` Mike Frysinger
2012-04-10 5:26 ` Paulo César Pereira de Andrade
2012-04-05 13:34 ` Dennis Gilmore
2012-04-11 10:55 ` Richard Earnshaw
2012-04-05 14:39 ` Steve McIntyre
2012-04-05 15:09 ` Mike Frysinger
2012-04-05 15:38 ` Paulo César Pereira de Andrade
2012-04-05 14:33 ` Steve McIntyre
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='CAFiYyc3sh+YtCRNVnrdu2Ec-sc5cjZcR7BF20xUxJLWQQF1S=A@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=aph@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rearnsha@arm.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.
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).