aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog8
-rw-r--r--binutils/objcopy.c18
2 files changed, 25 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 5b01202..1cbaca6 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,11 @@
+2003-06-27 Nick Clifton <nickc@redhat.com>
+
+ * objcopy.c (copy_object): Replace call to
+ bfd_create_gnu_debuglink_section with seperate calls to
+ bfd_add_gnu_debuglink_section and
+ bfd_fill_in_gnu_debuglink_section, seperated by a walk over the
+ symbol tables.
+
2003-06-26 Roland McGrath <roland@redhat.com>
* readelf.c (loadaddr): Variable removed.
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;