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]

PATCH for weak Vtable issue


>>>>> Mark Mitchell <mark@markmitchell.com> writes:

 >   o Of course, we don't want the `.globl' bit for functions

Why not?  assemble_function_start uses ASM_GLOBALIZE_LABEL.  I think the
right fix is probably

Wed Sep 23 18:44:58 1998  Jason Merrill  <jason@yorick.cygnus.com>

	* varasm.c (assemble_start_function, assemble_variable, weak_finish,
	assemble_alias): Do ASM_GLOBALIZE_LABEL for weak symbols, too.

Index: varasm.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/varasm.c,v
retrieving revision 1.39
diff -c -p -r1.39 varasm.c
*** varasm.c	1998/09/02 09:59:53	1.39
--- varasm.c	1998/09/24 01:43:24
*************** assemble_start_function (decl, fnname)
*** 1022,1028 ****
  #ifdef ASM_WEAKEN_LABEL
        if (DECL_WEAK (decl))
  	ASM_WEAKEN_LABEL (asm_out_file, fnname);
-       else
  #endif
        ASM_GLOBALIZE_LABEL (asm_out_file, fnname);
      }
--- 1022,1027 ----
*************** assemble_variable (decl, top_level, at_e
*** 1443,1449 ****
  #ifdef ASM_WEAKEN_LABEL
        if (DECL_WEAK (decl))
  	ASM_WEAKEN_LABEL (asm_out_file, name);
-       else
  #endif
        ASM_GLOBALIZE_LABEL (asm_out_file, name);
      }
--- 1442,1447 ----
*************** weak_finish ()
*** 4302,4307 ****
--- 4300,4306 ----
        for (t = weak_decls; t; t = t->next)
  	{
  	  ASM_WEAKEN_LABEL (asm_out_file, t->name);
+ 	  ASM_GLOBALIZE_LABEL (asm_out_file, t->name);
  	  if (t->value)
  	    ASM_OUTPUT_DEF (asm_out_file, t->name, t->value);
  	}
*************** assemble_alias (decl, target)
*** 4326,4334 ****
  #ifdef ASM_WEAKEN_LABEL
        if (DECL_WEAK (decl))
  	ASM_WEAKEN_LABEL (asm_out_file, name);
-       else
  #endif
! 	ASM_GLOBALIZE_LABEL (asm_out_file, name);
      }
  
    ASM_OUTPUT_DEF (asm_out_file, name, IDENTIFIER_POINTER (target));
--- 4325,4332 ----
  #ifdef ASM_WEAKEN_LABEL
        if (DECL_WEAK (decl))
  	ASM_WEAKEN_LABEL (asm_out_file, name);
  #endif
!       ASM_GLOBALIZE_LABEL (asm_out_file, name);
      }
  
    ASM_OUTPUT_DEF (asm_out_file, name, IDENTIFIER_POINTER (target));


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