PR24499, ignore --add-gnu-debuglink for archives
Alan Modra
amodra@gmail.com
Tue Nov 19 11:05:00 GMT 2019
objcopy --add-gnu-debuglink=foo.a.dbg foo.a just doesn't make any
sense. Who puts executables in archives? And if you did, wouldn't
you want to calculate the crc over each element of foo.a.dbg?
PR 24499
* objcopy.c (copy_file): Ignore --add-gnu-debuglink for archives.
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 99cc7beca8..f682fbeef4 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -3752,6 +3752,14 @@ copy_file (const char *input_filename, const char *output_filename,
status = 1;
return;
}
+
+ if (gnu_debuglink_filename != NULL)
+ {
+ non_fatal (_("--add-gnu-debuglink ignored for archive %s"),
+ bfd_get_filename (ibfd));
+ gnu_debuglink_filename = NULL;
+ }
+
/* This is a no-op on non-Coff targets. */
set_long_section_mode (obfd, ibfd, long_section_names);
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list