PR24499, ignore --add-gnu-debuglink for archives
authorAlan Modra <amodra@gmail.com>
Tue, 19 Nov 2019 10:49:24 +0000 (21:19 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 19 Nov 2019 11:02:42 +0000 (21:32 +1030)
objcopy --add-gnu-debuglink=foo.a.dbg foo.a just doesn't make any
sense.  Who puts executables in archives?

PR 24499
* objcopy.c (copy_file): Ignore --add-gnu-debuglink for archives.

binutils/ChangeLog
binutils/objcopy.c

index 19f1c4051a0e8812d3e81a78bd3c2a569f173e2b..eed7d335e11101724578ecf91af76fb7e2a6650f 100644 (file)
@@ -1,3 +1,8 @@
+2019-11-19  Alan Modra  <amodra@gmail.com>
+
+       PR 24499
+       * objcopy.c (copy_file): Ignore --add-gnu-debuglink for archives.
+
 2019-11-19  Alan Modra  <amodra@gmail.com>
 
        PR 24968
index 99cc7beca8f7241bddee8c0242670b4b895b0461..f682fbeef479390395693672665eb1bf29ee81ab 100644 (file)
@@ -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);
 
This page took 0.026318 seconds and 4 git commands to generate.