This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFC: Adjust asm_output_aligned_bss to honor section names
- From: Mark Mitchell <mark at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 1 Aug 2004 15:20:58 -0700
- Subject: RFC: Adjust asm_output_aligned_bss to honor section names
- Reply-to: mark at codesourcery dot com
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