diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 19f1c4051a0..eed7d335e11 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2019-11-19 Alan Modra + + PR 24499 + * objcopy.c (copy_file): Ignore --add-gnu-debuglink for archives. + 2019-11-19 Alan Modra PR 24968 diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 99cc7beca8f..f682fbeef47 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);