Minor formatting improvements.
This commit is contained in:
parent
ee61616c43
commit
9eaac302dc
|
@ -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>
|
Wed Jul 1 14:23:48 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
* rclex.l: Add casts and change types to avoid warnings.
|
* rclex.l: Add casts and change types to avoid warnings.
|
||||||
|
|
|
@ -27,6 +27,9 @@
|
||||||
#include "budbg.h"
|
#include "budbg.h"
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#include "elf/internal.h"
|
||||||
|
#include "elf-bfd.h"
|
||||||
|
|
||||||
#ifdef HAVE_GOOD_UTIME_H
|
#ifdef HAVE_GOOD_UTIME_H
|
||||||
#include <utime.h>
|
#include <utime.h>
|
||||||
#else /* ! HAVE_GOOD_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 strip_main PARAMS ((int, char **));
|
||||||
static int copy_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 **isympp = NULL; /* Input symbols */
|
||||||
static asymbol **osympp = NULL; /* Output symbols that survive stripping */
|
static asymbol **osympp = NULL; /* Output symbols that survive stripping */
|
||||||
|
@ -621,8 +624,8 @@ copy_object (ibfd, obfd)
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf (_("copy from %s(%s) to %s(%s)\n"),
|
printf (_("copy from %s(%s) to %s(%s)\n"),
|
||||||
bfd_get_filename(ibfd), bfd_get_target(ibfd),
|
bfd_get_filename (ibfd), bfd_get_target (ibfd),
|
||||||
bfd_get_filename(obfd), bfd_get_target(obfd));
|
bfd_get_filename (obfd), bfd_get_target (obfd));
|
||||||
|
|
||||||
if (set_start_set)
|
if (set_start_set)
|
||||||
start = set_start;
|
start = set_start;
|
||||||
|
@ -644,14 +647,15 @@ copy_object (ibfd, obfd)
|
||||||
bfd_get_mach (ibfd)));
|
bfd_get_mach (ibfd)));
|
||||||
|
|
||||||
if (!bfd_set_format (obfd, bfd_get_format (ibfd)))
|
if (!bfd_set_format (obfd, bfd_get_format (ibfd)))
|
||||||
RETURN_NONFATAL (bfd_get_filename(ibfd));
|
RETURN_NONFATAL (bfd_get_filename (ibfd));
|
||||||
|
|
||||||
if (isympp)
|
if (isympp)
|
||||||
free (isympp);
|
free (isympp);
|
||||||
|
|
||||||
if (osympp != isympp)
|
if (osympp != isympp)
|
||||||
free (osympp);
|
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. */
|
any output is done. Thus, we traverse all sections multiple times. */
|
||||||
bfd_map_over_sections (ibfd, setup_section, (void *) obfd);
|
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"),
|
non_fatal (_("Can't fill gap after %s: %s"),
|
||||||
bfd_get_section_name (obfd, osections[i]),
|
bfd_get_section_name (obfd, osections[i]),
|
||||||
bfd_errmsg (bfd_get_error()));
|
bfd_errmsg (bfd_get_error ()));
|
||||||
status = 1;
|
status = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -902,6 +906,7 @@ copy_object (ibfd, obfd)
|
||||||
now = 8192;
|
now = 8192;
|
||||||
else
|
else
|
||||||
now = left;
|
now = left;
|
||||||
|
|
||||||
if (! bfd_set_section_contents (obfd, osections[i], buf,
|
if (! bfd_set_section_contents (obfd, osections[i], buf,
|
||||||
off, now))
|
off, now))
|
||||||
RETURN_NONFATAL (bfd_get_filename (obfd));
|
RETURN_NONFATAL (bfd_get_filename (obfd));
|
||||||
|
@ -964,7 +969,7 @@ copy_archive (ibfd, obfd, output_target)
|
||||||
while (!status && this_element != (bfd *) NULL)
|
while (!status && this_element != (bfd *) NULL)
|
||||||
{
|
{
|
||||||
/* Create an output file for this member. */
|
/* 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);
|
(char *) NULL);
|
||||||
bfd *output_bfd = bfd_openw (output_name, output_target);
|
bfd *output_bfd = bfd_openw (output_name, output_target);
|
||||||
bfd *last_element;
|
bfd *last_element;
|
||||||
|
@ -1124,6 +1129,7 @@ setup_section (ibfd, isection, obfdarg)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
osection = bfd_make_section_anyway (obfd, bfd_section_name (ibfd, isection));
|
osection = bfd_make_section_anyway (obfd, bfd_section_name (ibfd, isection));
|
||||||
|
|
||||||
if (osection == NULL)
|
if (osection == NULL)
|
||||||
{
|
{
|
||||||
err = "making";
|
err = "making";
|
||||||
|
@ -1138,7 +1144,7 @@ setup_section (ibfd, isection, obfdarg)
|
||||||
err = "size";
|
err = "size";
|
||||||
goto loser;
|
goto loser;
|
||||||
}
|
}
|
||||||
|
|
||||||
vma = bfd_section_vma (ibfd, isection);
|
vma = bfd_section_vma (ibfd, isection);
|
||||||
if (p != NULL && p->change_vma == CHANGE_MODIFY)
|
if (p != NULL && p->change_vma == CHANGE_MODIFY)
|
||||||
vma += p->vma_val;
|
vma += p->vma_val;
|
||||||
|
@ -1161,7 +1167,7 @@ setup_section (ibfd, isection, obfdarg)
|
||||||
else if (p->change_lma == CHANGE_SET)
|
else if (p->change_lma == CHANGE_SET)
|
||||||
lma = p->lma_val;
|
lma = p->lma_val;
|
||||||
else
|
else
|
||||||
abort();
|
abort ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lma += change_section_address;
|
lma += change_section_address;
|
||||||
|
@ -1814,12 +1820,12 @@ copy_main (argc, argv)
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case 'b':
|
case 'b':
|
||||||
copy_byte = atoi(optarg);
|
copy_byte = atoi (optarg);
|
||||||
if (copy_byte < 0)
|
if (copy_byte < 0)
|
||||||
fatal (_("byte number must be non-negative"));
|
fatal (_("byte number must be non-negative"));
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
interleave = atoi(optarg);
|
interleave = atoi (optarg);
|
||||||
if (interleave < 1)
|
if (interleave < 1)
|
||||||
fatal (_("interleave must be positive"));
|
fatal (_("interleave must be positive"));
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1640,7 +1640,7 @@ process_section_headers (file)
|
||||||
|
|
||||||
printf (_("\nSection Header%s:\n"), elf_header.e_shnum > 1 ? "s" : "");
|
printf (_("\nSection Header%s:\n"), elf_header.e_shnum > 1 ? "s" : "");
|
||||||
printf
|
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;
|
for (i = 0, section = section_headers;
|
||||||
i < elf_header.e_shnum;
|
i < elf_header.e_shnum;
|
||||||
|
|
Loading…
Reference in New Issue