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

RFC: Adjust asm_output_aligned_bss to honor section names


The config/arm/unknown-elf.h file contains a definition of
ASM_OUTPUT_ALIGNED_BSS which is exactly like asm_output_aligned_bss,
except that if the declaration is in a name section, that designation
is honored.

In contrast, asm_output_aligned_bss always puts entities in the .bss
section, even if an explicit section attribute was provided.  I think
that asm_output_aligned_bss should do:

  if (IN_NAMED_SECTION (decl))
    named_section (decl, NULL, 0);
  else
    bss_section ();

instead.  The current version just seems wrong; we should not just be
ignoring the user's request to put variables in a particular section.
If that can't be supported on some targets, then we should issue an
error message, not silently ignore the diirective.

Thoughts?  

If I were to make this change, how else do I need to test it, other
than by using the ARM configuration?

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


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