diff options
author | Nick Clifton <nickc@redhat.com> | 2003-06-27 08:01:28 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-06-27 08:01:28 +0000 |
commit | e7c81c254c0efabd933b208c8702d98d81b2bffa (patch) | |
tree | 41c9020838a2113579244f6b503605c1d8f4b301 /binutils/objcopy.c | |
parent | 72b4917c07ca0e1e2610c32543a2662dd2048f91 (diff) | |
download | gdb-e7c81c254c0efabd933b208c8702d98d81b2bffa.zip gdb-e7c81c254c0efabd933b208c8702d98d81b2bffa.tar.gz gdb-e7c81c254c0efabd933b208c8702d98d81b2bffa.tar.bz2 |
Fix --add-gnu-debuglink
Diffstat (limited to 'binutils/objcopy.c')
-rw-r--r-- | binutils/objcopy.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c index de77767..9b87a8a 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -1132,6 +1132,7 @@ copy_object (ibfd, obfd) bfd_vma start; long symcount; asection **osections = NULL; + asection * gnu_debuglink_section = NULL; bfd_size_type *gaps = NULL; bfd_size_type max_gap = 0; long symsize; @@ -1249,8 +1250,13 @@ copy_object (ibfd, obfd) if (gnu_debuglink_filename != NULL) { - if (! bfd_add_gnu_debuglink (obfd, gnu_debuglink_filename)) + gnu_debuglink_section = bfd_create_gnu_debuglink_section (obfd, gnu_debuglink_filename); + + if (gnu_debuglink_section == NULL) + { + fprintf (stderr, "UGG\n"); RETURN_NONFATAL (gnu_debuglink_filename); + } } if (gap_fill_set || pad_to_set) @@ -1413,6 +1419,16 @@ copy_object (ibfd, obfd) } } + if (gnu_debuglink_filename != NULL) + { + if (! bfd_fill_in_gnu_debuglink_section + (obfd, gnu_debuglink_section, gnu_debuglink_filename)) + { + fprintf (stderr, "UGG 2\n"); + RETURN_NONFATAL (gnu_debuglink_filename); + } + } + if (gap_fill_set || pad_to_set) { bfd_byte *buf; |