diff options
author | Denis Chertykov <denisc@overta.ru> | 2000-06-07 16:45:46 +0000 |
---|---|---|
committer | Denis Chertykov <denisc@gcc.gnu.org> | 2000-06-07 20:45:46 +0400 |
commit | 3f8a8c683b0930176c3d10c36df48041f9fec96e (patch) | |
tree | 90441b54ed11bbd1ff94657d9b76c080e5757ae1 | |
parent | 7bf81eeefc61820c53f1ce886ed23905e5aab9f5 (diff) | |
download | gcc-3f8a8c683b0930176c3d10c36df48041f9fec96e.zip gcc-3f8a8c683b0930176c3d10c36df48041f9fec96e.tar.gz gcc-3f8a8c683b0930176c3d10c36df48041f9fec96e.tar.bz2 |
avr.c (asm_output_section_name): output section attributes.
* config/avr/avr.c (asm_output_section_name): output section
attributes.
* config/avr/libgcc.S (.text.libgcc): declare section attributes.
From-SVN: r34445
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/avr/avr.c | 10 | ||||
-rw-r--r-- | gcc/config/avr/libgcc.S | 2 |
3 files changed, 14 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2f8e558..7906c8d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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. + 2000-06-06 James E. Wilson <wilson@cygnus.com> * frame.h (struct unwind_info_ptr): Collapse version, flags, and length diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index fbb96cf..dda7190 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -3206,16 +3206,20 @@ unique_section (decl, reloc) } -/* Output section name to file FILE */ +/* 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 ATTRIBUTE_UNUSED; + tree decl; const char *name; int reloc ATTRIBUTE_UNUSED; { - fprintf (file, ".section %s\n", name); + fprintf (FILE, ".section\t%s,\"%s\",@progbits\n", name, \ + decl && TREE_CODE (decl) == FUNCTION_DECL ? "ax" : + decl && TREE_READONLY (decl) ? "a" : "aw"); } diff --git a/gcc/config/avr/libgcc.S b/gcc/config/avr/libgcc.S index ffaf6cf..10fa12e 100644 --- a/gcc/config/avr/libgcc.S +++ b/gcc/config/avr/libgcc.S @@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */ #define __SP_H__ 0x3e #define __SP_L__ 0x3d - .section .text.libgcc + .section .text.libgcc, "ax", @progbits /******************************************************* Multiplication 8 x 8 |