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]

Re: fix g++.dg/init/init-ref2.C on alpha/elf


Richard Henderson wrote:

>There are some mighty curious games being played in obscure_complex_init.
>
>Alpha/ELF was emitting stuff into bss via SELECT_SECTION instead of
letting
>varasm.c do it via ASM_OUTPUT_*_BSS.  Which somehow caused a disconnect
>between cp/decl.c and varasm.c, which resulted in _ZGRZ1gvE1i not being
>allocated any memory whatsoever.  That is, _ZGRZ1gvE1i and _ZGVZ1gvE1i
>actaully overlapped.  Hilarity ensues.

Thanks for analysing this problem; we were seeing the same problem on
s390x but didn't understand it ...

I've committed this patch to fix the problem on s390x.

Bye,
Ulrich


ChangeLog:

     * config/s390/linux.h (ASM_OUTPUT_ALIGNED_BSS): New.

Index: gcc/config/s390/linux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/linux.h,v
retrieving revision 1.12
diff -c -p -r1.12 linux.h
*** linux.h    2002/02/06 20:55:37 1.12
--- linux.h    2002/02/14 16:34:05
*************** Boston, MA 02111-1307, USA.  */
*** 197,202 ****
--- 197,209 ----
  #define ASM_OUTPUT_SKIP(FILE, SIZE)  \
    fprintf ((FILE), "\t.set\t.,.+%u\n", (SIZE))

+ /* This is how to output assembler code to declare an
+    uninitialized external linkage data object.  */
+
+ #undef ASM_OUTPUT_ALIGNED_BSS
+ #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
+   asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
+
  /* Output before read-only data.  */

  #define TEXT_SECTION_ASM_OP ".text"



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