aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog7
-rw-r--r--binutils/ar.c1
-rw-r--r--binutils/bucomm.c9
-rw-r--r--binutils/objcopy.c1
4 files changed, 8 insertions, 10 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index bbf94d2..94ec445 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,10 @@
+2016-07-16 Alan Modra <amodra@gmail.com>
+
+ * ar.c: Don't include libbfd.h.
+ * objcopy.c: Likewise.
+ * bucomm.c (bfd_get_archive_filename): Use xmalloc rather than
+ bfd_malloc.
+
2016-07-15 Alan Modra <amodra@gmail.com>
* testsuite/binutils-all/remove-relocs-01.s: Use .dc.a, not .word.
diff --git a/binutils/ar.c b/binutils/ar.c
index 3afa253..1337710 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -29,7 +29,6 @@
#include "progress.h"
#include "getopt.h"
#include "aout/ar.h"
-#include "libbfd.h"
#include "bucomm.h"
#include "arsup.h"
#include "filenames.h"
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index 8ecd7f2..e719cd3 100644
--- a/binutils/bucomm.c
+++ b/binutils/bucomm.c
@@ -616,14 +616,7 @@ bfd_get_archive_filename (const bfd *abfd)
if (curr)
free (buf);
curr = needed + (needed >> 1);
- buf = (char *) bfd_malloc (curr);
- /* If we can't malloc, fail safe by returning just the file name.
- This function is only used when building error messages. */
- if (!buf)
- {
- curr = 0;
- return bfd_get_filename (abfd);
- }
+ buf = (char *) xmalloc (curr);
}
sprintf (buf, "%s(%s)", bfd_get_filename (abfd->my_archive),
bfd_get_filename (abfd));
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index cf3f983..2e8ff27 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -28,7 +28,6 @@
#include "filenames.h"
#include "fnmatch.h"
#include "elf-bfd.h"
-#include "libbfd.h"
#include "coff/internal.h"
#include "libcoff.h"