Documentation problem with TEXT_SECTION_ASM_OP

Paulo Matos pmatos@broadcom.com
Wed Oct 24 15:03:00 GMT 2012


> -----Original Message-----
> From: Joseph Myers [mailto:joseph@codesourcery.com]
> Sent: 24 October 2012 13:32
> To: Paulo Matos
> Cc: gcc@gcc.gnu.org
> Subject: RE: Documentation problem with TEXT_SECTION_ASM_OP
> 
> 
> I don't like this #else.  Presumably the libgcc code already works if
> TEXT_SECTION_ASM_OP isn't defined at all.  So the equivalent is simply not
> to define __LIBGCC_TEXT_SECTION_ASM_OP__ in that case, rather than
> synthesizing a definition from other information.
> 
> If however you want to synthesize a definition, then I think
> TEXT_SECTION_ASM_OP should be converted to a target hook (at least to
> the
> extent of targhooks.c being the only place testing it, if it remains at
> all), so that the logic generating predefined macros is unconditional.
> 

I think we might really need to synthesize it since as I said before I don't think crtstuff.c is ok with it if TEXT_SECTION_ASM_OP is not defined. I will look into the best way to do that.

> > #define __LIBGCC_TEXT_SECTION_ASM_OP__ "        .section .text, "axU""
> 
> So you should teach builtin_define_with_value to generate proper escapes
> when producing a string.
> 

I am slightly amazed that nothing implemented this before in GCC. I have defined a simple function that deals with the most used escapes.
Is there a better source of allowed escapes in GCC besides looking into the lexer?

Are these changes to handling of TEXT_SECTION_ASM_OP interesting for GCC? If they are I will look further into improving the code and turning it into a patch.

Cheers,

Paulo Matos




More information about the Gcc mailing list