PR libcgj/57074
* varasm.c (output_object_block): Use .org for each item in
section anchor block rather than padding.
===================================================================
@@ -7095,6 +7105,10 @@
HOST_WIDE_INT offset;
tree decl;
rtx symbol;
+#if HAVE_GNU_AS
+ static int labelno;
+ char buf[30];
+#endif
if (!block->objects)
return;
@@ -7104,6 +7118,12 @@
switch_to_section (block->sect);
assemble_align (block->alignment);
+#if HAVE_GNU_AS
+ ASM_GENERATE_INTERNAL_LABEL (buf, "LANCB", labelno);
+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, buf);
+ ++labelno;
+#endif
+
/* Define the values of all anchors relative to the current section
position. */
FOR_EACH_VEC_SAFE_ELT (block->anchors, i, symbol)
@@ -7114,7 +7134,14 @@
FOR_EACH_VEC_ELT (*block->objects, i, symbol)
{
/* Move to the object's offset, padding with zeros if necessary. */
+#if HAVE_GNU_AS
+ fprintf (asm_out_file, "\t.org ");
+ assemble_name_raw (asm_out_file, buf);
+ fprintf (asm_out_file, "+" HOST_WIDE_INT_PRINT_DEC "\n",
+ SYMBOL_REF_BLOCK_OFFSET (symbol));
+#else
assemble_zeros (SYMBOL_REF_BLOCK_OFFSET (symbol) - offset);
+#endif
offset = SYMBOL_REF_BLOCK_OFFSET (symbol);
if (CONSTANT_POOL_ADDRESS_P (symbol))
{
@@ -7154,6 +7181,7 @@
}
}
}
+ gcc_checking_assert (offset == block->size);
}
/* A htab_traverse callback used to call output_object_block for