This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
possible fix for assemble_start_function?
- To: egcs-bugs at cygnus dot com, egcs at cygnus dot com
- Subject: possible fix for assemble_start_function?
- From: Mumit Khan <khan at xraylith dot wisc dot edu>
- Date: Tue, 28 Oct 1997 11:44:10 -0600
The following change lets me build code with templates on a i386-cygwin32
target. The problem is that cygwin32 target doesn't define
ASM_WEAKEN_LABEL, and hence the functions are always given global
attribute via ASM_GLOBALIZE_LABEL in assemble_start_function, which is
not correct for template instances with linkonce directive.
For the original problem report, please see my messages in egcs-bugs
with the following Subject: "i386-cygwin32: C++ template codegen bug".
This is probably incorrect, but might help others looking at the problem.
Tue Oct 28 11:37:26 1997 Mumit Khan <khan@brahma.xraylith.wisc.edu>
* varasm.c (assemble_start_function): Don't globalize symbols that
are meant to have single instances.
--- varasm.c.~1 Tue Oct 28 10:44:25 1997
+++ varasm.c Tue Oct 28 11:08:14 1997
@@ -1071,4 +1071,7 @@ assemble_start_function (decl, fnname)
BC_GLOBALIZE_LABEL (asm_out_file, fnname);
else
+#ifdef ASM_OUTPUT_SECTION_NAME
+ if (! DECL_ONE_ONLY (decl))
+#endif
ASM_GLOBALIZE_LABEL (asm_out_file, fnname);
}
Regards,
Mumit -- khan@xraylith.wisc.edu
http://www.xraylith.wisc.edu/~khan/