+2004-12-18 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR middle-end/15486
+ * varasm.c (asm_emit_uninitialised): Return early if
+ a custom section is requested.
+ (assemble_variable): Revert 2002-03-15 patch.
+
2004-12-18 Richard Henderson <rth@redhat.com>
* stor-layout.c (layout_decl): Use unshare_expr, not unsave_expr.
destination = asm_dest_common;
}
+ if (destination != asm_dest_common)
+ {
+ resolve_unique_section (decl, 0, flag_data_sections);
+ /* Custom sections don't belong here. */
+ if (DECL_SECTION_NAME (decl))
+ return false;
+ }
+
if (destination == asm_dest_bss)
globalize_decl (decl);
- resolve_unique_section (decl, 0, flag_data_sections);
if (flag_shared_data)
{
if (DECL_PRESERVE_P (decl))
targetm.asm_out.mark_decl_preserved (name);
- /* Output any data that we will need to use the address of. */
- if (DECL_INITIAL (decl) == error_mark_node)
- reloc = contains_pointers_p (TREE_TYPE (decl)) ? 3 : 0;
- else if (DECL_INITIAL (decl))
- {
- reloc = compute_reloc_for_constant (DECL_INITIAL (decl));
- output_addressed_constants (DECL_INITIAL (decl));
- }
- resolve_unique_section (decl, reloc, flag_data_sections);
-
/* Handle uninitialized definitions. */
/* If the decl has been given an explicit section name, then it
if (TREE_PUBLIC (decl) && DECL_NAME (decl))
globalize_decl (decl);
+ /* Output any data that we will need to use the address of. */
+ if (DECL_INITIAL (decl) == error_mark_node)
+ reloc = contains_pointers_p (TREE_TYPE (decl)) ? 3 : 0;
+ else if (DECL_INITIAL (decl))
+ {
+ reloc = compute_reloc_for_constant (DECL_INITIAL (decl));
+ output_addressed_constants (DECL_INITIAL (decl));
+ }
+
/* Switch to the appropriate section. */
+ resolve_unique_section (decl, reloc, flag_data_sections);
variable_section (decl, reloc);
/* dbxout.c needs to know this. */