aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-11-06 20:03:01 +0000
committerIan Lance Taylor <ian@airs.com>1995-11-06 20:03:01 +0000
commit28b5eb12a3384cc58246e9e7f36fd5af86377351 (patch)
treeb553565b26421c5846f19d046c4e99438ed861c4 /binutils
parent1bc9204d5bfc2640c6d5fee8cc167f90054e5320 (diff)
downloadgdb-28b5eb12a3384cc58246e9e7f36fd5af86377351.zip
gdb-28b5eb12a3384cc58246e9e7f36fd5af86377351.tar.gz
gdb-28b5eb12a3384cc58246e9e7f36fd5af86377351.tar.bz2
* bucomm.h: Include <sys/types.h>.
* ar.c: Don't include <sys/types.h> or <stdio.h>. * bucomm.c, dlltool.c, nlmconv.c, objcopy.c, objdump.c: Likewise.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/dlltool.c1
-rw-r--r--binutils/objcopy.c27
3 files changed, 9 insertions, 25 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index dd9f8ec..98f72da 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+Mon Nov 6 15:00:50 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * bucomm.h: Include <sys/types.h>.
+ * ar.c: Don't include <sys/types.h> or <stdio.h>.
+ * bucomm.c, dlltool.c, nlmconv.c, objcopy.c, objdump.c: Likewise.
+
Fri Nov 3 12:38:09 1995 Ian Lance Taylor <ian@cygnus.com>
* objdump.c: Include <sys/types.h>.
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index 23f98cc..8a1e102 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -166,7 +166,6 @@
#include "libiberty.h"
#include "bucomm.h"
#include "getopt.h"
-#include <sys/types.h>
#include "demangle.h"
#include <ctype.h>
#ifdef HAVE_SYS_WAIT_H
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index befe509..be63d83 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -18,13 +18,12 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
-#include "sysdep.h"
#include "progress.h"
#include "bucomm.h"
#include <getopt.h>
#include "libiberty.h"
+#include <sys/stat.h>
-static bfd_vma parse_vma PARAMS ((const char *, const char *));
static flagword parse_flags PARAMS ((const char *));
static struct section_list *find_section_list PARAMS ((const char *, boolean));
static void setup_section PARAMS ((bfd *, asection *, PTR));
@@ -258,26 +257,6 @@ Usage: %s [-vVsSgxX] [-I bfdname] [-O bfdname] [-F bfdname] [-R section]\n\
exit (exit_status);
}
-/* Parse a string into a VMA, with a fatal error if it can't be
- parsed. */
-
-static bfd_vma
-parse_vma (s, arg)
- const char *s;
- const char *arg;
-{
- bfd_vma ret;
- const char *end;
-
- ret = bfd_scan_vma (s, &end, 0);
- if (*end != '\0')
- {
- fprintf (stderr, "%s: %s: bad number: %s\n", program_name, arg, s);
- exit (1);
- }
- return ret;
-}
-
/* Parse section flags into a flagword, with a fatal error if the
string can't be parsed. */
@@ -1254,7 +1233,7 @@ mark_symbols_used_in_relocations (ibfd, isection, symbolsarg)
bfd_fatal (bfd_get_filename (ibfd));
if (relsize == 0)
- return 0;
+ return;
relpp = (arelent **) xmalloc (relsize);
relcount = bfd_canonicalize_reloc (ibfd, isection, relpp, symbols);
@@ -1292,7 +1271,7 @@ simple_copy (from, to)
fromfd = open (from, O_RDONLY);
if (fromfd < 0)
return -1;
- tofd = open (to, O_WRONLY | O_CREAT | O_TRUNC);
+ tofd = creat (to, 0777);
if (tofd < 0)
{
saved = errno;