This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, ARM] Enable libsanitizer
- From: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Evgeniy Stepanov <eugenis at google dot com>, Christophe Lyon <christophe dot lyon at linaro dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Patch Tracking <patches at linaro dot org>
- Date: Thu, 28 Mar 2013 12:23:44 +0400
- Subject: Re: [Patch, ARM] Enable libsanitizer
- References: <CAKdteObkDtD99dihWAwZiAszRW2Qxpr=mA+bkc79Wp8V2Kmgyg at mail dot gmail dot com> <CAGQ9bdzS796KHnxDhpnA2YDuwUBD8hpf9oOC+cHKqkFKEk0N_Q at mail dot gmail dot com> <CAFKCwriDNUoh3frJcMgCj0OLP06tq5YUH_=N5OsHS7-agzfpHg at mail dot gmail dot com> <20130328080733 dot GB20616 at tucnak dot redhat dot com>
On Thu, Mar 28, 2013 at 12:07 PM, Jakub Jelinek <firstname.lastname@example.org> wrote:
> On Thu, Mar 28, 2013 at 12:00:23PM +0400, Evgeniy Stepanov wrote:
>> We do it because newer versions of Android use PIE binaries, and,
>> combined with other specifics of address space on Linux/ARM, there is
>> no space for ASan shadow anywhere else. And it's faster.
>> Zero-based shadow requires PIE. Non-zero-based requires non-PIE on
>> Android. Is it the same with QEMU? If so, we should switch to
>> zero-based for uniformity and performance.
> I don't think most of the arm-linux-gnueabi binaries are PIEs, so using
> zero shadow offset would be wrong on Linux. If 1 << 29 works (e.g. prelink
> library area on linux-arm is 0x41000000 .. 0x50000000, so
> shadow of 0x20000000 .. 0x3fffffff is fine for that), IMHO we should use it.
Do we need two separate offsets for Linux/ARM and Android/ARM?
That's what we have in clang today.