This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Section attribute for 'arm-semi-aout' target
- To: gcc-patches at gcc dot gnu dot org
- Subject: Section attribute for 'arm-semi-aout' target
- From: Vladik Goytin <goytin at yahoo dot com>
- Date: Wed, 21 Jul 1999 06:16:04 -0400 (EDT)
Hello, GCC Team!
My patch is very simple and is not intended to fix a bug.
It's improvement (probably).
It adds support of the section attribute variables to the target
'arm-semi-aout' for the sections ".text" and ".data" only.
To implement this feature I added macro ASM_OUTPUT_SECTION_NAME
to the gcc/config/arm/aout.h file. The patch works as I got a working
binary file.
Because the patch itself is very small (11 lines of code),
I assume it can be accepted without a copyright assignment form.
Presented below are:
- ChangeLog entry
-------------------------------------------------------------------
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)
--------------------------------------------------------------------
- the patch ifself produced by 'diff -up OLD NEW' command
on the basis of the egcs-1.1.2 release.
To be applied as 'patch -p0 < PATCH' where 'PATCH' must reside
in the same directory where EGCS source tree:
-rw-r--r-- aout.h.diff
drwxr-xr-x egcs-1.1.2/
--------------------------------------------------------------------
--- egcs-1.1.2/gcc/config/arm/aout.h Wed Jul 21 13:04:14 1999
+++ aout.h Wed Jul 21 13:03:52 1999
@@ -241,6 +241,20 @@ do { char dstr[30];
\
/* Output a source line for the debugger. */
/* #define ASM_OUTPUT_SOURCE_LINE(STREAM,LINE) */
+#define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC) \
+ if (strcmp (NAME, ".text") != 0 && strcmp (NAME, ".data") != 0) \
+ { \
+ printf ("Section attribute supported only for sections \
+\".text\" and \".data\".\n"); \
+ abort (); \
+ } \
+ else \
+ { \
+ fprintf (FILE, "%s\n", NAME); \
+ }
+
+
+
/* Output a #ident directive. */
#define ASM_OUTPUT_IDENT(STREAM,STRING) \
fprintf (STREAM,"- - - ident %s\n",STRING)
---------------------------------------------------------------------
Best regards,
Vladik
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com