This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
powerpc64-linux -gstabs fix
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 4 Jun 2002 23:26:28 +0930
- Subject: powerpc64-linux -gstabs fix
hello.s: Assembler messages:
hello.s:197: Error: can't resolve `.text' {.text section} - `main' {.opd section}
resulting from
.main:
.stabn 68,0,3,.LM1-main
.LM1:
We need a `.' in front of that last "main".
gcc/ChangeLog
* config/rs6000/linux64.h (ASM_OUTPUT_SOURCE_LINE): Define.
OK mainline and branch?
diff -urpN -xCVS -x'*~' -xTAGS gcc.orig/gcc/config/rs6000/linux64.h gcc/gcc/config/rs6000/linux64.h
--- gcc.orig/gcc/config/rs6000/linux64.h 2002-04-12 22:32:56.000000000 +0930
+++ gcc/gcc/config/rs6000/linux64.h 2002-06-04 22:58:30.000000000 +0930
@@ -294,3 +294,22 @@ do { \
|| (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
&& ! TARGET_NO_FP_IN_TOC)))))
+/* This is the same as the dbxelf.h version, except that we need to
+ use the function code label, not the function descriptor. */
+#undef ASM_OUTPUT_SOURCE_LINE
+#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
+do \
+ { \
+ static int sym_lineno = 1; \
+ char temp[256]; \
+ ASM_GENERATE_INTERNAL_LABEL (temp, "LM", sym_lineno); \
+ fprintf (FILE, "\t.stabn 68,0,%d,", LINE); \
+ assemble_name (FILE, temp); \
+ fputs ("-.", FILE); \
+ assemble_name (FILE, \
+ XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
+ putc ('\n', FILE); \
+ ASM_OUTPUT_INTERNAL_LABEL (FILE, "LM", sym_lineno); \
+ sym_lineno += 1; \
+ } \
+while (0)
--
Alan Modra
IBM OzLabs - Linux Technology Centre