From: Szabolcs Nagy <szabolcs.nagy@arm.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: Marcus Shawcroft <Marcus.Shawcroft@arm.com>,
Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>,
Andreas Krebbel <krebbel@linux.vnet.ibm.com>,
"H.J. Lu" <hjl.tools@gmail.com>
Subject: Re: [PATCH] Fix default_binds_local_p_2 for extern protected data
Date: Mon, 10 Aug 2015 11:04:00 -0000 [thread overview]
Message-ID: <55C8854D.5060609@arm.com> (raw)
In-Reply-To: <55AFCC7C.8010105@arm.com>
ping.
On 22/07/15 18:01, Szabolcs Nagy wrote:
> The commit
> https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=222184
> changed a true to false in varasm.c:
>
> bool
> default_binds_local_p_2 (const_tree exp)
> {
> - return default_binds_local_p_3 (exp, flag_shlib != 0, true, true);
> + return default_binds_local_p_3 (exp, flag_shlib != 0, true, false,
> + !flag_pic);
> }
>
> where
>
> default_binds_local_p_3 (const_tree exp, bool shlib, bool weak_dominate,
> - bool extern_protected_data)
> + bool extern_protected_data, bool common_local_p)
> {
>
> false means that extern protected data binds locally,
> which is wrong if the target can have copy relocations
> against it (then the address must be loaded from GOT
> otherwise the main executable will see different address).
>
> Currently S/390, ARM and AArch64 targets use this predicate
> and the current default is wrong for all of them (they can
> have copy relocs) so I changed the default instead of doing
> it in a target specific way.
>
> The equivalent x86_64 bug was
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248
> the default was changed for
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65780
> now i opened
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66912
> for arm and aarch64.
>
> Needs a further binutils patch too to emit R_*_GLOB_DAT
> instead of R_*_RELATIVE relocs for protected data.
> The glibc elf/tst-protected1a and elf/tst-protected1b
> tests depend on this.
>
> Tested ARM and AArch64 targets.
>
> gcc/ChangeLog:
>
> 2015-07-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
>
> PR target/66912
> * varasm.c (default_binds_local_p_2): Turn on extern_protected_data.
>
> gcc/testsuite/ChangeLog:
>
> 2015-07-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
>
> PR target/66912
> * gcc.target/aarch64/pr66912.c: New.
> * gcc.target/arm/pr66912.c: New.
>
next prev parent reply other threads:[~2015-08-10 11:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 17:06 Szabolcs Nagy
2015-08-10 11:04 ` Szabolcs Nagy [this message]
2015-09-17 9:32 ` Szabolcs Nagy
2015-09-30 15:02 ` Bernd Schmidt
2015-09-30 16:43 ` Szabolcs Nagy
2015-09-30 20:28 ` Andreas Krebbel
2015-10-14 9:56 ` Szabolcs Nagy
2015-10-19 10:12 ` Szabolcs Nagy
2015-10-19 18:53 ` Richard Henderson
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=55C8854D.5060609@arm.com \
--to=szabolcs.nagy@arm.com \
--cc=Marcus.Shawcroft@arm.com \
--cc=Ramana.Radhakrishnan@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=krebbel@linux.vnet.ibm.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).