Submitted to trunk after approval from Richard :
http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01747.html
Thanks,
-Sri.

On Mon, Sep 26, 2011 at 2:09 PM, Sriraman Tallam <tmsri...@google.com> wrote:
> Hi,
>
>   Here is a simple patch to add SECTION_EXCLUDE to the list of
> section flag macros. Is this ok for trunk?
>
> Thanks,
> -Sri.
>
>
>        * output.h (SECTION_EXCLUDE): New macro.
>        * varasm.c (default_elf_asm_named_section): Check for
>        SECTION_EXCLUDE.
>
> Index: gcc/varasm.c
> ===================================================================
> --- gcc/varasm.c        (revision 179208)
> +++ gcc/varasm.c        (working copy)
> @@ -6159,6 +6159,8 @@ default_elf_asm_named_section (const char *name, u
>
>   if (!(flags & SECTION_DEBUG))
>     *f++ = 'a';
> +  if (flags & SECTION_EXCLUDE)
> +    *f++ = 'e';
>   if (flags & SECTION_WRITE)
>     *f++ = 'w';
>   if (flags & SECTION_CODE)
> Index: gcc/output.h
> ===================================================================
> --- gcc/output.h        (revision 179208)
> +++ gcc/output.h        (working copy)
> @@ -443,6 +443,7 @@ extern void no_asm_to_stream (FILE *);
>  #define SECTION_COMMON   0x800000      /* contains common data */
>  #define SECTION_RELRO   0x1000000      /* data is readonly after relocation
> processing */
>  #define SECTION_MACH_DEP 0x2000000     /* subsequent bits reserved for 
> target */
> +#define SECTION_EXCLUDE  0x4000000      /* discarded by the linker */
>
>  /* This SECTION_STYLE is used for unnamed sections that we can switch
>    to using a special assembler directive.  */
>

Reply via email to