diff options
author | Michael Meissner <meissner@gcc.gnu.org> | 1997-05-19 22:03:56 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 1997-05-19 22:03:56 +0000 |
commit | ab9eef419eb4d180c1155e591f51fe81fb7960b8 (patch) | |
tree | fd40fb9f4a0ec0a1965e5c555622ce59f5abc14c /gcc | |
parent | aa4fd28c7a26c948bc67e16681dad488d74b6656 (diff) | |
download | gcc-ab9eef419eb4d180c1155e591f51fe81fb7960b8.zip gcc-ab9eef419eb4d180c1155e591f51fe81fb7960b8.tar.gz gcc-ab9eef419eb4d180c1155e591f51fe81fb7960b8.tar.bz2 |
Fix powerpc-{eabi,linux,sysv} problem with -mrelocatable
From-SVN: r14103
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index e2d283d..9764661 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -81,6 +81,7 @@ int rs6000_compare_fp_p; /* Label number of label created for -mrelocatable, to call to so we can get the address of the GOT section */ int rs6000_pic_labelno; +int rs6000_pic_func_labelno; /* Which abi to adhere to */ char *rs6000_abi_name = RS6000_ABI_NAME; @@ -3355,7 +3356,7 @@ rs6000_output_load_toc_table (file) fprintf (file, "\tl"); fprintf (file, " %s,(", reg_names[0]); - ASM_GENERATE_INTERNAL_LABEL (buf, "LCL", rs6000_pic_labelno); + ASM_GENERATE_INTERNAL_LABEL (buf, "LCL", rs6000_pic_func_labelno); assemble_name (file, buf); fprintf (file, "-"); ASM_GENERATE_INTERNAL_LABEL (buf, "LCF", rs6000_pic_labelno); @@ -3664,7 +3665,12 @@ output_prolog (file, size) /* If TARGET_MINIMAL_TOC, and the constant pool is needed, then load the TOC_TABLE address into register 30. */ if (TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0) - rs6000_output_load_toc_table (file); + { +#ifdef USING_SVR4_H + rs6000_pic_func_labelno = rs6000_pic_labelno; +#endif + rs6000_output_load_toc_table (file); + } if (DEFAULT_ABI == ABI_NT) { |