diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2015-03-27 18:11:00 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2015-03-27 11:11:00 -0700 |
commit | a5eef8e9b024741b8d661c628643a9850616b813 (patch) | |
tree | 6f1f7fb2c72bb99e77499fa0b962b812dcc32188 /gcc/output.h | |
parent | f21a589997d17031e4d5169e7ef24f10d59c9530 (diff) | |
download | gcc-a5eef8e9b024741b8d661c628643a9850616b813.zip gcc-a5eef8e9b024741b8d661c628643a9850616b813.tar.gz gcc-a5eef8e9b024741b8d661c628643a9850616b813.tar.bz2 |
Add default_binds_local_p_2 and use it for x86
Protected data symbol means that it can't be pre-emptied. It doesn't mean
its address won't be external. This is true for pointer to protected
function. With copy relocation, address of protected data defined in the
shared library may also be external. We only know that for sure at
run-time. TARGET_BINDS_LOCAL_P should return false on protected data
symbol.
gcc/
PR target/65248
* output.h (default_binds_local_p_2): New.
* varasm.c (default_binds_local_p_2): Renamed to ...
(default_binds_local_p_3): This. Don't return true on protected
data symbol if protected data may be external.
(default_binds_local_p): Use default_binds_local_p_3.
(default_binds_local_p_1): Likewise.
(default_binds_local_p_2): New.
* config/i386/i386.c (TARGET_BINDS_LOCAL_P): Set to
default_binds_local_p_2 if TARGET_MACHO is undefined.
gcc/testsuite/
PR target/65248
* gcc.target/i386/pr65248-1.c: New file.
* gcc.target/i386/pr65248-2.c: Likewise.
* gcc.target/i386/pr65248-3.c: Likewise.
* gcc.target/i386/pr65248-4.c: Likewise.
From-SVN: r221742
Diffstat (limited to 'gcc/output.h')
-rw-r--r-- | gcc/output.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/output.h b/gcc/output.h index 217d979..53e47d0 100644 --- a/gcc/output.h +++ b/gcc/output.h @@ -586,6 +586,7 @@ extern void default_asm_output_anchor (rtx); extern bool default_use_anchors_for_symbol_p (const_rtx); extern bool default_binds_local_p (const_tree); extern bool default_binds_local_p_1 (const_tree, int); +extern bool default_binds_local_p_2 (const_tree); extern void default_globalize_label (FILE *, const char *); extern void default_globalize_decl_name (FILE *, tree); extern void default_emit_unwind_label (FILE *, tree, int, int); |