aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1998-07-01 23:30:34 +0000
committerNick Clifton <nickc@redhat.com>1998-07-01 23:30:34 +0000
commit9eaac302dc7dcdd6d46e088b911677a951f23cfa (patch)
tree2d75f40ce6f53feb5910eb2d1017df27cfe30bf4 /binutils
parentee61616c43290eb233fec9958923761130dbfc6a (diff)
downloadgdb-9eaac302dc7dcdd6d46e088b911677a951f23cfa.zip
gdb-9eaac302dc7dcdd6d46e088b911677a951f23cfa.tar.gz
gdb-9eaac302dc7dcdd6d46e088b911677a951f23cfa.tar.bz2
Minor formatting improvements.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/objcopy.c28
-rw-r--r--binutils/readelf.c2
3 files changed, 23 insertions, 12 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 58369d8..85c7e2c 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jul 1 16:29:50 1998 Nick Clifton <nickc@cygnus.com>
+
+ * objcopy.c: Minor formatting improvements.
+ * readelf.c: Minor output formatting improvement.
+
Wed Jul 1 14:23:48 1998 Ian Lance Taylor <ian@cygnus.com>
* rclex.l: Add casts and change types to avoid warnings.
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index f2b1156..194478a 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -27,6 +27,9 @@
#include "budbg.h"
#include <sys/stat.h>
+#include "elf/internal.h"
+#include "elf-bfd.h"
+
#ifdef HAVE_GOOD_UTIME_H
#include <utime.h>
#else /* ! HAVE_GOOD_UTIME_H */
@@ -72,7 +75,7 @@ static void set_times PARAMS ((const char *, const struct stat *));
static int strip_main PARAMS ((int, char **));
static int copy_main PARAMS ((int, char **));
-#define RETURN_NONFATAL(s) {bfd_nonfatal(s); status = 1; return;}
+#define RETURN_NONFATAL(s) {bfd_nonfatal (s); status = 1; return;}
static asymbol **isympp = NULL; /* Input symbols */
static asymbol **osympp = NULL; /* Output symbols that survive stripping */
@@ -621,8 +624,8 @@ copy_object (ibfd, obfd)
if (verbose)
printf (_("copy from %s(%s) to %s(%s)\n"),
- bfd_get_filename(ibfd), bfd_get_target(ibfd),
- bfd_get_filename(obfd), bfd_get_target(obfd));
+ bfd_get_filename (ibfd), bfd_get_target (ibfd),
+ bfd_get_filename (obfd), bfd_get_target (obfd));
if (set_start_set)
start = set_start;
@@ -644,14 +647,15 @@ copy_object (ibfd, obfd)
bfd_get_mach (ibfd)));
if (!bfd_set_format (obfd, bfd_get_format (ibfd)))
- RETURN_NONFATAL (bfd_get_filename(ibfd));
+ RETURN_NONFATAL (bfd_get_filename (ibfd));
if (isympp)
free (isympp);
+
if (osympp != isympp)
free (osympp);
- /* bfd mandates that all output sections be created and sizes set before
+ /* BFD mandates that all output sections be created and sizes set before
any output is done. Thus, we traverse all sections multiple times. */
bfd_map_over_sections (ibfd, setup_section, (void *) obfd);
@@ -753,7 +757,7 @@ copy_object (ibfd, obfd)
{
non_fatal (_("Can't fill gap after %s: %s"),
bfd_get_section_name (obfd, osections[i]),
- bfd_errmsg (bfd_get_error()));
+ bfd_errmsg (bfd_get_error ()));
status = 1;
break;
}
@@ -902,6 +906,7 @@ copy_object (ibfd, obfd)
now = 8192;
else
now = left;
+
if (! bfd_set_section_contents (obfd, osections[i], buf,
off, now))
RETURN_NONFATAL (bfd_get_filename (obfd));
@@ -964,7 +969,7 @@ copy_archive (ibfd, obfd, output_target)
while (!status && this_element != (bfd *) NULL)
{
/* Create an output file for this member. */
- char *output_name = concat (dir, "/", bfd_get_filename(this_element),
+ char *output_name = concat (dir, "/", bfd_get_filename (this_element),
(char *) NULL);
bfd *output_bfd = bfd_openw (output_name, output_target);
bfd *last_element;
@@ -1124,6 +1129,7 @@ setup_section (ibfd, isection, obfdarg)
return;
osection = bfd_make_section_anyway (obfd, bfd_section_name (ibfd, isection));
+
if (osection == NULL)
{
err = "making";
@@ -1138,7 +1144,7 @@ setup_section (ibfd, isection, obfdarg)
err = "size";
goto loser;
}
-
+
vma = bfd_section_vma (ibfd, isection);
if (p != NULL && p->change_vma == CHANGE_MODIFY)
vma += p->vma_val;
@@ -1161,7 +1167,7 @@ setup_section (ibfd, isection, obfdarg)
else if (p->change_lma == CHANGE_SET)
lma = p->lma_val;
else
- abort();
+ abort ();
}
else
lma += change_section_address;
@@ -1814,12 +1820,12 @@ copy_main (argc, argv)
switch (c)
{
case 'b':
- copy_byte = atoi(optarg);
+ copy_byte = atoi (optarg);
if (copy_byte < 0)
fatal (_("byte number must be non-negative"));
break;
case 'i':
- interleave = atoi(optarg);
+ interleave = atoi (optarg);
if (interleave < 1)
fatal (_("interleave must be positive"));
break;
diff --git a/binutils/readelf.c b/binutils/readelf.c
index a364d7d..11bf26a 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -1640,7 +1640,7 @@ process_section_headers (file)
printf (_("\nSection Header%s:\n"), elf_header.e_shnum > 1 ? "s" : "");
printf
- (_(" [Nr] Name Type Addr Off Size ES Flg Lk In Al\n"));
+ (_(" [Nr] Name Type Addr Off Size ES Flg Lk Inf Al\n"));
for (i = 0, section = section_headers;
i < elf_header.e_shnum;