aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBin Bin Lv <shlb@linux.ibm.com>2020-03-19 12:10:44 -0400
committerBin Bin Lv <shlb@linux.ibm.com>2020-03-19 23:32:44 -0400
commit4a18f168f47cfa4a41a01aad64a6041eab64ad7b (patch)
tree447f4e16dc810742d203f92e9b63450f8599b31f /gcc
parent94e2418780f1d13235f3e2e6e5c09dbe821c1ce3 (diff)
downloadgcc-4a18f168f47cfa4a41a01aad64a6041eab64ad7b.zip
gcc-4a18f168f47cfa4a41a01aad64a6041eab64ad7b.tar.gz
gcc-4a18f168f47cfa4a41a01aad64a6041eab64ad7b.tar.bz2
[rs6000] Rewrite the declaration of a variable
Rewrite the declaration of toc_section from the source file rs6000.c to its header file for standardizing the code. Bootstrap and regression were done on powerpc64le-linux-gnu (LE) with no regressions. gcc/ChangeLog 2020-03-20 Bin Bin Lv <shlb.linux.ibm.com> * config/rs6000/rs6000-internal.h (toc_section): Remove the declaration. * config/rs6000/rs6000.h (toc_section): Add the declaration. * config/rs6000/rs6000.c (toc_section): Remove the declaration.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/rs6000/rs6000-internal.h1
-rw-r--r--gcc/config/rs6000/rs6000.c1
-rw-r--r--gcc/config/rs6000/rs6000.h1
3 files changed, 1 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000-internal.h b/gcc/config/rs6000/rs6000-internal.h
index d331b9e..9caef01 100644
--- a/gcc/config/rs6000/rs6000-internal.h
+++ b/gcc/config/rs6000/rs6000-internal.h
@@ -64,7 +64,6 @@ typedef struct rs6000_stack {
extern int need_toc_init;
extern char toc_label_name[10];
extern int rs6000_pic_labelno;
-extern section *toc_section;
#ifdef USING_ELFOS_H
extern const char *rs6000_machine;
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 2080c7d..4ecf972 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -181,7 +181,6 @@ static GTY(()) section *tls_private_data_section;
static GTY(()) section *read_only_private_data_section;
static GTY(()) section *sdata2_section;
-extern GTY(()) section *toc_section;
section *toc_section = 0;
/* Describe the vector unit used for modes. */
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 79b3dd6..1adc371 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -2492,6 +2492,7 @@ extern GTY(()) tree rs6000_builtin_decls[RS6000_BUILTIN_COUNT];
#ifndef USED_FOR_TARGET
extern GTY(()) tree builtin_mode_to_type[MAX_MACHINE_MODE][2];
extern GTY(()) tree altivec_builtin_mask_for_load;
+extern GTY(()) section *toc_section;
/* A C structure for machine-specific, per-function data.
This is added to the cfun structure. */