This is the mail archive of the gcc-bugs@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: 3.2 ia64: conflict with asms and -g


Wichmann, Mats D wrote:
What I'd like to find out is if this is a bug in
gcc, or if it's not considered kosher to use
section declaration in asm statements, or what
the story is.

Changing the section behind the compiler's back is bad. The compiler remembers what section it is in to reduce the amount of assembly section switching code it emits. Thus an asm must not change the section.


Try using pushsection/popsection. Any ELF based assembler should accept that, and that will leave you where you began. If you only need one level, then .section/.previous should work too. See the GNU AS manual for more info.

On IA-64, there is the .xdata directive which eliminates the need to switch sections before emitting data. One of the arguments to this directive is the section that the data goes into. This will only work for an IA-64 target though. See the Intel IA-64 assembly language manual.

Jim


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