This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [Android] The reason why -Bsymbolic is turned on by default
- From: Alexander Ivchenko <aivchenk at gmail dot com>
- To: Ard Biesheuvel <ard dot biesheuvel at gmail dot com>
- Cc: Andrew Haley <aph at redhat dot com>, Maxim Kuvyrkov <maxim dot kuvyrkov at gmail dot com>, gcc <gcc at gcc dot gnu dot org>
- Date: Thu, 4 Apr 2013 13:45:48 +0400
- Subject: Re: [Android] The reason why -Bsymbolic is turned on by default
- References: <CACysShhf84eXKOVLrnB_GxGvPzLwWsGFgR4k4SrYz+UThuqATQ at mail dot gmail dot com> <515BF5A7 dot 9070808 at redhat dot com> <CACysShhr2aRRU4a2NgiEDtqv=9eViOd=0PrZQLJiSCc40Kpx2A at mail dot gmail dot com> <515C03D0 dot 3080803 at redhat dot com> <CAKFga-c+3S_Ww5A8BQWTu+79aU49fnqf63NOF2DGjdRitBmQsA at mail dot gmail dot com>
Thank you very much for clarification.
>> > Having that in mind, we have:
>> > 1) All shared libraries for Android are built with -Bsymbolic
>> > 2) Dynamic loader throws an error if we are doing COPY relocation
>> > against DT_SYMBOLIC libs.
>> >
>> > So any COPY relocation is doomed to failure.. Ard, what was the reason
>> > for introducing the support of this type of relocations in dynamic
>> > loader in the first place?
> The original implementation allowed them, but was broken. Disallowing
> them would break BC, so fixing them was considered the best option.
> (I think the initial support predates the default Bsymbolic setting.)
Oh, I see now. Since x86 port started when Bsymbolic was the default I
don't see any point of implementing R_386_COPY relocation in dynamic
loader for it. (same can be applied for R_MIPS_COPY)
best regards,
Alexander