+2007-11-07 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * dllfixdbg: Pass --only-keep-debug to objcopy, instead of
+ selecting the sections manually.
+
2007-11-06 Corinna Vinschen <corinna@vinschen.de>
* thread.cc (pthread_key_create): Drop check for incoming valid object.
#!/usr/bin/perl
-# Copyright 2006 Red Hat, Inc.
+# Copyright 2006, 2007 Red Hat, Inc.
#
# This file is part of Cygwin.
#
my @objcopy = ((shift));
my $dll = shift;
my $dbg = shift;
-xit 0, @objcopy, '-j', '.stab', '-j', '.stabstr', '-j', '.debug_aranges',
- '-j', '.debug_pubnames', '-j', '.debug_info', '-j', '.debug_abbrev',
- '-j', '.debug_line', '-j', '.debug_frame', '-j', '.debug_str', '-j',
- '.debug_loc', '-j', '.debug_macinfo', '-j', '.debug_ranges', $dll, $dbg;
+xit 0, @objcopy, '--only-keep-debug', $dll, $dbg;
+xit 0, @objcopy, '-R', '.gnu_debuglink_overlay', $dbg;
xit 0, @objcopy, '-g', '--add-gnu-debuglink=' . $dbg, $dll;
open(OBJDUMP, '-|', "$objdump --headers $dll");
my %section;