This is the mail archive of the gcc@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]

Documentation problem with TEXT_SECTION_ASM_OP


Hi,

TEXT_SECTION_ASM_OP doc says:
"A C expression whose value is a string, including spacing, containing the assembler operation that should precede instructions and read-only data."

However, crtstuff.c uses `asm(TEXT_SECTION_ASM_OP)'.

I am trying to use a C expression for TEXT_SECTION_ASM_OP like:
#define TEXT_SECTION_ASM_OP (arch == "v2" ? "\t.section .text, \"ax\"" : "\t.section .textc, \"axz\"")

This seems to be valid according to the docs but fails to compile crtstuff.c since TEXT_SECTION_ASM_OP should be a string literal to be used with asm.
Since this is most likely a problem with the docs, how can I achieve something like this and have only a string literal as value or TEXT_SECTION_ASM_OP?

Cheers,

Paulo Matos




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