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]

Re: Section attribute for 'arm-semi-aout' target


Hi Vladik,

: Wed Jul 21 12:37:34 IDT 1999 Vladik Goytin (goytin@yahoo.com)
: 
: 	* added section attribute for the target 'arm-semi-aout'
: 	  for the sections ".text" and ".data" only
: 	  gcc/config/arm/aout.h (macro ASM_OUTPUT_SECTION_NAME)

  Thanks for this patch.  I have applied it to the sources with a few
minor modifications (see below) that prevent it from corrupt the
arm-elf and arm-coff builds.

Cheers
	Nick


Index: aout.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arm/aout.h,v
retrieving revision 1.10
diff -p -r1.10 aout.h
*** aout.h	1999/07/17 13:44:34	1.10
--- aout.h	1999/07/22 09:14:45
*************** Boston, MA 02111-1307, USA.  */
*** 311,316 ****
--- 311,333 ----
  /* Output a source line for the debugger.  */
  /* #define ASM_OUTPUT_SOURCE_LINE(STREAM,LINE) */
  
+ /* Output a section name.  */
+ #ifndef ASM_OUTPUT_SECTION_NAME
+ #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC)		     \
+   do									     \
+     {									     \
+       if (strcmp (NAME, ".text") != 0 && strcmp (NAME, ".data") != 0) 	     \
+         {                                                             	     \
+           fprintf (stderr,						     \
+ "Section attribute supported only for sections \".text\" and \".data\".\n"); \
+           abort ();                                                   	     \
+         }                                                                    \
+       else                                                            	     \
+         fprintf (FILE, "%s\n", NAME);                               	     \
+     }									     \
+   while (0)
+ #endif
+ 
  /* Output a #ident directive.  */
  #ifndef ASM_OUTPUT_IDENT
  #define ASM_OUTPUT_IDENT(STREAM,STRING)  \


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