2009/8/1 Dave Korn <dave.korn.cyg...@googlemail.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
>

Ok, Then i don't understand your solution.

>> you could use the TARGET_ASM_FILE_END hook to output
>> directives that re-enter each used section and then output your new 
>> directive.

if i want to do the following in the assembly output

section .code
.....
.....
......
section_end


you are saying that if i emit a section directive the compiler will
switch to the previously emitted section and then i have to somehow
seek to the end of that section and emit my 'section_end' directive?

Shafi

Reply via email to