This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Output sections
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Mohamed Shafi <shafitvm at gmail dot com>
- Cc: Dave Korn <dave dot korn dot cygwin at googlemail dot com>, GCC <gcc at gcc dot gnu dot org>
- Date: Sat, 01 Aug 2009 07:37:22 +0100
- Subject: Re: Output sections
- References: <ba0bd44d0907180149s2f135eccp4be437f1f34351e2@mail.gmail.com> <4A61B97A.7030009@gmail.com> <ba0bd44d0907310642pead6b79md2cb30c11ae383c6@mail.gmail.com>
Mohamed Shafi wrote:
> I am looking for adding something to the end of each section in the
> generated .s file. Using TARGET_ASM_NAMED_SECTION i will be able to
> keep track of the sections that are being emitted. But from
> TARGET_ASM_FILE_END hook how can i re-enter into each section. Are the
> sections stored in some global variable?
I'm not sure I understand the question. You "enter a section" simply by
emitting the correct .section directive into the asm output. You re-enter it by
the same method.
cheers,
DaveK