defaults.h (DWARF2_GENERATE_TEXT_SECTION_LABEL): New macro.
authorMark Mitchell <mark@codesourcery.com>
Thu, 22 Jul 1999 02:16:55 +0000 (02:16 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 22 Jul 1999 02:16:55 +0000 (02:16 +0000)
* defaults.h (DWARF2_GENERATE_TEXT_SECTION_LABEL): New macro.
* tm.texi (DWARF2_GENERATE_TEXT_SECTION_LABEL): Define it.
  * dwarf2out.c (dwarf2out_init): Don't output a label to mark the
  start of the text section if DWARF2_GENERATE_TEXT_SECTION_LABEL is
false.
* config/mips/iris6.h (DWARF2_GENERATE_TEXT_SECTION_LABEL):
Define to zero.

From-SVN: r28213

gcc/ChangeLog
gcc/config/mips/iris6.h
gcc/defaults.h
gcc/dwarf2out.c
gcc/tm.texi

index ffc896a14bfaaa4643acf37784d6bff0744a94ed..fb6fc1e11f9373f79d89f714838c9ad49e0f8936 100644 (file)
@@ -1,3 +1,13 @@
+Wed Jul 21 00:46:58 1999  Mark P. Mitchell  <mark@codesourcery.com>
+
+       * defaults.h (DWARF2_GENERATE_TEXT_SECTION_LABEL): New macro.
+       * tm.texi (DWARF2_GENERATE_TEXT_SECTION_LABEL): Define it.
+       * dwarf2out.c (dwarf2out_init): Don't output a label to mark the
+       start of the text section if DWARF2_GENERATE_TEXT_SECTION_LABEL is
+       false.
+       * config/mips/iris6.h (DWARF2_GENERATE_TEXT_SECTION_LABEL): 
+       Define to zero.
+       
 1999-07-21  Michael Meissner  <meissner@cygnus.com>
 
        * print-rtl.c (print_rtx): Print the names of the virtual
index 9df7732e8b078a24d55dd634d1feee96b79c1166..47d4ea85d398e2b551f342d2e5cddb9360201295 100644 (file)
@@ -34,6 +34,11 @@ Boston, MA 02111-1307, USA.  */
  irix5.h file.  */
 #undef DWARF2_UNWIND_INFO
 
+/* The Irix6 assembler will sometimes assign labels to the wrong
+   section unless the labels are within .ent/.end blocks.  Therefore,
+   we avoid creating such labels.  */
+#define DWARF2_GENERATE_TEXT_SECTION_LABEL 0
+
 /* For Irix 6, -mabi=64 implies TARGET_LONG64.  */
 /* This is handled in override_options.  */
 
index a0e3bfca57acacd3b64057cb3bf354c3d1fe3c92..14c365a2b44002ecae7578878cb0c9b7e1d8a2eb 100644 (file)
@@ -154,3 +154,13 @@ do { fprintf (FILE, "\t%s\t", ASM_LONG);                           \
 #if !defined (DWARF2_UNWIND_INFO) && defined (INCOMING_RETURN_ADDR_RTX)
 #define DWARF2_UNWIND_INFO 1
 #endif
+
+/* By default, we generate a label at the beginning and end of the
+   text section, and compute the size of the text section by
+   subtracting the two.  However, on some platforms that doesn't 
+   work, and we use the section itself, rather than a label at the
+   beginning of it, to indicate the start of the section.  On such
+   platforms, define this to zero.  */
+#ifndef DWARF2_GENERATE_TEXT_SECTION_LABEL
+#define DWARF2_GENERATE_TEXT_SECTION_LABEL 1
+#endif
index 90bedcb0acaf4a0a116264c017c5346eaa3a6832..4e1ebee44adf68b70a533110902ee5f25d2c3cfe 100644 (file)
@@ -10008,7 +10008,10 @@ dwarf2out_init (asm_out_file, main_input_filename)
 
   ASM_GENERATE_INTERNAL_LABEL (text_end_label, TEXT_END_LABEL, 0);
   ASM_GENERATE_INTERNAL_LABEL (abbrev_section_label, ABBREV_SECTION_LABEL, 0);
-  ASM_GENERATE_INTERNAL_LABEL (text_section_label, TEXT_SECTION_LABEL, 0);
+  if (DWARF2_GENERATE_TEXT_SECTION_LABEL)
+    ASM_GENERATE_INTERNAL_LABEL (text_section_label, TEXT_SECTION_LABEL, 0);
+  else
+    strcpy (text_section_label, stripattributes (TEXT_SECTION));
   ASM_GENERATE_INTERNAL_LABEL (debug_info_section_label, 
                               DEBUG_INFO_SECTION_LABEL, 0);
   ASM_GENERATE_INTERNAL_LABEL (debug_line_section_label, 
@@ -10017,7 +10020,8 @@ dwarf2out_init (asm_out_file, main_input_filename)
   ASM_OUTPUT_SECTION (asm_out_file, ABBREV_SECTION);
   ASM_OUTPUT_LABEL (asm_out_file, abbrev_section_label);
   ASM_OUTPUT_SECTION (asm_out_file, TEXT_SECTION);
-  ASM_OUTPUT_LABEL (asm_out_file, text_section_label);
+  if (DWARF2_GENERATE_TEXT_SECTION_LABEL)
+    ASM_OUTPUT_LABEL (asm_out_file, text_section_label);
   ASM_OUTPUT_SECTION (asm_out_file, DEBUG_INFO_SECTION);
   ASM_OUTPUT_LABEL (asm_out_file, debug_info_section_label);
   ASM_OUTPUT_SECTION (asm_out_file, DEBUG_LINE_SECTION);
index 28fefa847c4b1f2dd00a8a92c1157b2ea97440e6..a44c27bc5a2ada4511cbc4d4b1a08f39dc5118d5 100644 (file)
@@ -6908,6 +6908,13 @@ Normally, if the user specifies only @samp{-ggdb} GNU CC will use Dwarf
 version 2 if available; this macro disables this.  See the description
 of the @code{PREFERRED_DEBUGGING_TYPE} macro for more details.
 
+@findex DWARF2_GENERATE_TEXT_SECTION_LABEL
+@item DWARF2_GENERATE_TEXT_SECTION_LABEL
+By default, the Dwarf 2 debugging information generator will generate a
+label to mark the beginning of the text section.  If it is better simply
+to use the name of the text section itself, rather than an explicit label,
+to indicate the beginning of the text section, define this macro to zero.
+
 @findex PUT_SDB_@dots{}
 @item PUT_SDB_@dots{}
 Define these macros to override the assembler syntax for the special