avr port: asm section attributes

Denis Chertykov denisc@overta.ru
Wed Jun 7 09:45:00 GMT 2000


Wed Jun  7 20:34:33 2000  Denis Chertykov  <denisc@overta.ru>

	* config/avr/avr.c (asm_output_section_name): output section
	attributes.
	* config/avr/libgcc.S (.text.libgcc): declare section attributes.


Index: gcc/config/avr/avr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/avr/avr.c,v
retrieving revision 1.11
diff -c -3 -p -r1.11 avr.c
*** avr.c	2000/05/11 18:53:24	1.11
--- avr.c	2000/06/07 16:39:04
*************** unique_section (decl, reloc)
*** 3206,3221 ****
  }
  
  
! /* Output section name to file FILE */
  
  void
  asm_output_section_name(file, decl, name, reloc)
       FILE *file;
!      tree decl ATTRIBUTE_UNUSED;
       const char *name;
       int reloc ATTRIBUTE_UNUSED;
  {
!   fprintf (file, ".section %s\n", name);
  }
  
  
--- 3206,3225 ----
  }
  
  
! /* Output section name to file FILE
!    We make the section read-only and executable for a function decl,
!    read-only for a const data decl, and writable for a non-const data decl.  */
  
  void
  asm_output_section_name(file, decl, name, reloc)
       FILE *file;
!      tree decl;
       const char *name;
       int reloc ATTRIBUTE_UNUSED;
  {
!   fprintf (FILE, ".section\t%s,\"%s\",@progbits\n", name, \
! 	   decl && TREE_CODE (decl) == FUNCTION_DECL ? "ax" :
! 	   decl && TREE_READONLY (decl) ? "a" : "aw");
  }
  
  
Index: gcc/config/avr/libgcc.S
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/avr/libgcc.S,v
retrieving revision 1.3
diff -c -3 -p -r1.3 libgcc.S
*** libgcc.S	2000/05/15 23:14:15	1.3
--- libgcc.S	2000/06/07 16:39:05
*************** Boston, MA 02111-1307, USA.  */
*** 32,38 ****
  #define __SP_H__ 0x3e
  #define __SP_L__ 0x3d
  
! 	.section .text.libgcc
  	
  /*******************************************************
                 Multiplication  8 x 8
--- 32,38 ----
  #define __SP_H__ 0x3e
  #define __SP_L__ 0x3d
  
! 	.section .text.libgcc, "ax", @progbits
  	
  /*******************************************************
                 Multiplication  8 x 8




More information about the Gcc-patches mailing list