This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Minor config/elfos.h tweak



Myself (and others) are in the process of revamping the ELF support for
PA processors.

As part of the work we want to use some of the common include files like
elfos.h for generic elf (rtems) stuff and linux.h+svr4.h for the linux port.

The PA assembler syntax requires that only labels appear in column zero.  So
we lose if these generic files emit assembler directives into column zero.

This fixes elfos to avoid that problem.  linux.h & svr4 may need a similar
tweak in the future (I haven't checked them).

	* elfos.h (const_section): Output a tab before assembler directives.
	(ctors_section, dtors_section): Likewise.
	(ASM_OUTPUT_SECTION_NAME): Likewise.

Index: elfos.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/elfos.h,v
retrieving revision 1.5
diff -c -3 -p -r1.5 elfos.h
*** elfos.h	1999/03/26 10:45:26	1.5
--- elfos.h	1999/06/30 12:56:43
*************** const_section ()							\
*** 289,295 ****
      text_section();							\
    else if (in_section != in_const)					\
      {									\
!       fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP);		\
        in_section = in_const;						\
      }									\
  }
--- 289,295 ----
      text_section();							\
    else if (in_section != in_const)					\
      {									\
!       fprintf (asm_out_file, "\t%s\n", CONST_SECTION_ASM_OP);		\
        in_section = in_const;						\
      }									\
  }
*************** ctors_section ()							\
*** 300,306 ****
  {									\
    if (in_section != in_ctors)						\
      {									\
!       fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP);		\
        in_section = in_ctors;						\
      }									\
  }
--- 300,306 ----
  {									\
    if (in_section != in_ctors)						\
      {									\
!       fprintf (asm_out_file, "\t%s\n", CTORS_SECTION_ASM_OP);		\
        in_section = in_ctors;						\
      }									\
  }
*************** dtors_section ()							\
*** 311,317 ****
  {									\
    if (in_section != in_dtors)						\
      {									\
!       fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP);		\
        in_section = in_dtors;						\
      }									\
  }
--- 311,317 ----
  {									\
    if (in_section != in_dtors)						\
      {									\
!       fprintf (asm_out_file, "\t%s\n", DTORS_SECTION_ASM_OP);		\
        in_section = in_dtors;						\
      }									\
  }
*************** do {									\
*** 350,363 ****
        s->type = type;							\
        s->next = sections;						\
        sections = s;							\
!       fprintf (FILE, ".section\t%s,\"%s\",@progbits\n", NAME, mode);	\
      }									\
    else									\
      {									\
        if (DECL && s->type != type)					\
  	error_with_decl (DECL, "%s causes a section type conflict");	\
  									\
!       fprintf (FILE, ".section\t%s\n", NAME);				\
      }									\
  } while (0)
  
--- 350,363 ----
        s->type = type;							\
        s->next = sections;						\
        sections = s;							\
!       fprintf (FILE, "\t.section\t%s,\"%s\",@progbits\n", NAME, mode);	\
      }									\
    else									\
      {									\
        if (DECL && s->type != type)					\
  	error_with_decl (DECL, "%s causes a section type conflict");	\
  									\
!       fprintf (FILE, "\t.section\t%s\n", NAME);				\
      }									\
  } while (0)
  









Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]