On 06/30/2016 08:32 AM, Andre Vieira (lists) wrote:
@@ -14498,6 +14499,14 @@ Print CPU tuning information as comment in assembler file. This is an option used only for regression testing of the compiler and not intended for ordinary use in compiling code. This option is disabled by default. + +@item -mpure-code +@opindex mpure-code +GCC will generate assembly where instructions and data are in separate sections.
s/will generate/generates/
+It also gives all text sections the ELF processor-specific section attribute +SHF_ARM_PURECODE. This option is only available for ELF targets in thumb mode +that support Thumb2.
The proper spellings are "Thumb" and "Thumb-2", but wouldn't it be more clear just to say "This option is only available when generating Thumb-2 code for ELF targets." ??
diff --git a/gcc/target.def b/gcc/target.def index a4df363698ce776b51d11c187baed2069ba88a52..514db908d33b6ae77b33772e1d92fc25dc760c92 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -432,6 +432,16 @@ this section is associated.", void, (const char *name, unsigned int flags, tree decl), default_no_named_section) +/* Tell assembler what section attributes to assign this elf section + declaration, using their numerical value. */ +DEFHOOK +(elf_flags_numeric, + "If this function returns true, it will pass the section attributes using\n\ +their numeric value in @var{num} based on the bits set in @var{flags}. This\n\ +function is called by @code{default_elf_asm_named_section}.", + bool, (unsigned int flags, unsigned int *num), + default_asm_elf_flags_numeric) +
I don't understand "will pass" means in this context, even with the additional description you included in your patch e-mail. I think it would be more helpful to communicate the purpose of this hook if you could rethink this as "If the target needs to <do X>, this hook should be implemented to <do y>." And again, please document current behavior in the present tense, not the future tense.
-Sandra