This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/65015] LTO produces randomly ordered debug information
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Feb 2015 20:06:31 +0000
- Subject: [Bug lto/65015] LTO produces randomly ordered debug information
- Auto-submitted: auto-generated
- References: <bug-65015-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65015
--- Comment #17 from H.J. Lu <hjl.tools at gmail dot com> ---
This patch works wit the existing linker:
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 0211306..f3241a8 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -7043,7 +7043,12 @@ default_file_start (void)
fputs (ASM_APP_OFF, asm_out_file);
if (targetm.asm_file_start_file_directive)
- output_file_directive (asm_out_file, main_input_filename);
+ {
+ if (in_lto_p)
+ output_file_directive (asm_out_file, "<artificial>");
+ else
+ output_file_directive (asm_out_file, main_input_filename);
+ }
}
/* This is a generic routine suitable for use as TARGET_ASM_FILE_END