summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/rs6000.c
diff options
context:
space:
mode:
authormeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>1997-05-19 22:03:56 +0000
committermeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>1997-05-19 22:03:56 +0000
commitdc602d3d3fc8823e6fe46df17c5a1b6c0b5eb335 (patch)
treefd40fb9f4a0ec0a1965e5c555622ce59f5abc14c /gcc/config/rs6000/rs6000.c
parent6055ceb37ffcf6b650a32ec8ba18a4a128da071c (diff)
downloadgcc-dc602d3d3fc8823e6fe46df17c5a1b6c0b5eb335.tar.gz
Fix powerpc-{eabi,linux,sysv} problem with -mrelocatable
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14103 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/rs6000.c')
-rw-r--r--gcc/config/rs6000/rs6000.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index e2d283dd767..9764661c9db 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)
{