This is the mail archive of the
mailing list for the GCC project.
Documentation problem with TEXT_SECTION_ASM_OP
- From: "Paulo Matos" <pmatos at broadcom dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 23 Oct 2012 11:08:16 +0000
- Subject: Documentation problem with TEXT_SECTION_ASM_OP
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?