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]
Other format: [Raw text]

Re: [PATCH] Add SECTION_EXCLUDE to list of section flags


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 <tmsriram@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. ?*/
>


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