mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
* dlltool.c: Change names of generated files. .*.s-> -*.s
* objdump.c (dump_section_stabs): Check for names which are supersets of selected names. binutils/7240.
This commit is contained in:
@ -1,3 +1,14 @@
|
|||||||
|
Mon Jun 19 09:06:49 1995 Steve Chamberlain <sac@slash.cygnus.com>
|
||||||
|
|
||||||
|
* dlltool.c: Change names of generated files. .*.s-> -*.s
|
||||||
|
|
||||||
|
* objdump.c (dump_section_stabs): Check for names
|
||||||
|
which are supersets of selected names. binutils/7240.
|
||||||
|
|
||||||
|
Wed Jun 14 19:43:52 1995 Doug Evans <dje@canuck.cygnus.com>
|
||||||
|
|
||||||
|
* dlltool.c (mtable, ARM jump): Must redirect via pc offsetable ptr.
|
||||||
|
|
||||||
Wed Jun 14 13:27:22 1995 Steve Chamberlain <sac@slash.cygnus.com>
|
Wed Jun 14 13:27:22 1995 Steve Chamberlain <sac@slash.cygnus.com>
|
||||||
|
|
||||||
* deflex.l, defparse.y, dlltool.c: New files.
|
* deflex.l, defparse.y, dlltool.c: New files.
|
||||||
|
@ -55,6 +55,7 @@ boolean disassemble; /* -d */
|
|||||||
boolean disassemble_all; /* -D */
|
boolean disassemble_all; /* -D */
|
||||||
boolean formats_info; /* -i */
|
boolean formats_info; /* -i */
|
||||||
char *only; /* -j secname */
|
char *only; /* -j secname */
|
||||||
|
int wide_output; /* -w */
|
||||||
|
|
||||||
/* Extra info to pass to the disassembler address printing function. */
|
/* Extra info to pass to the disassembler address printing function. */
|
||||||
struct objdump_disasm_info {
|
struct objdump_disasm_info {
|
||||||
@ -119,15 +120,16 @@ usage (stream, status)
|
|||||||
int status;
|
int status;
|
||||||
{
|
{
|
||||||
fprintf (stream, "\
|
fprintf (stream, "\
|
||||||
Usage: %s [-ahifdDrRtTxsSl] [-b bfdname] [-m machine] [-j section-name]\n\
|
Usage: %s [-ahifdDrRtTxsSlw] [-b bfdname] [-m machine] [-j section-name]\n\
|
||||||
[--archive-headers] [--target=bfdname] [--disassemble]\n\
|
[--archive-headers] [--target=bfdname] [--disassemble]\n\
|
||||||
[--disassemble-all] [--file-headers] [--section-headers] [--headers]\n\
|
[--disassemble-all] [--file-headers] [--section-headers] [--headers]\n\
|
||||||
[--info] [--section=section-name] [--line-numbers] [--source]\n\
|
[--info] [--section=section-name] [--line-numbers] [--source]\n",
|
||||||
|
program_name);
|
||||||
|
fprintf (stream, "\
|
||||||
[--architecture=machine] [--reloc] [--full-contents] [--stabs]\n\
|
[--architecture=machine] [--reloc] [--full-contents] [--stabs]\n\
|
||||||
[--syms] [--all-headers] [--dynamic-syms] [--dynamic-reloc]\n\
|
[--syms] [--all-headers] [--dynamic-syms] [--dynamic-reloc]\n\
|
||||||
[--version] [--help] objfile...\n\
|
[--wide] [--version] [--help] objfile...\n\
|
||||||
at least one option besides -l (--line-numbers) must be given\n",
|
at least one option besides -l (--line-numbers) must be given\n");
|
||||||
program_name);
|
|
||||||
list_supported_targets (program_name, stream);
|
list_supported_targets (program_name, stream);
|
||||||
exit (status);
|
exit (status);
|
||||||
}
|
}
|
||||||
@ -155,6 +157,7 @@ static struct option long_options[]=
|
|||||||
{"syms", no_argument, NULL, 't'},
|
{"syms", no_argument, NULL, 't'},
|
||||||
{"target", required_argument, NULL, 'b'},
|
{"target", required_argument, NULL, 'b'},
|
||||||
{"version", no_argument, &show_version, 1},
|
{"version", no_argument, &show_version, 1},
|
||||||
|
{"wide", no_argument, &wide_output, 'w'},
|
||||||
{0, no_argument, 0, 0}
|
{0, no_argument, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -176,8 +179,10 @@ dump_section_header (abfd, section, ignored)
|
|||||||
(unsigned) bfd_get_section_size_before_reloc (section));
|
(unsigned) bfd_get_section_size_before_reloc (section));
|
||||||
printf (" vma ");
|
printf (" vma ");
|
||||||
printf_vma (section->vma);
|
printf_vma (section->vma);
|
||||||
printf (" align 2**%u\n ",
|
printf (" lma ");
|
||||||
section->alignment_power);
|
printf_vma (section->lma);
|
||||||
|
printf (" align 2**%u%s ",
|
||||||
|
section->alignment_power, (wide_output) ? "" : "\n");
|
||||||
PF (SEC_ALLOC, "ALLOC");
|
PF (SEC_ALLOC, "ALLOC");
|
||||||
PF (SEC_CONSTRUCTOR, "CONSTRUCTOR");
|
PF (SEC_CONSTRUCTOR, "CONSTRUCTOR");
|
||||||
PF (SEC_CONSTRUCTOR_TEXT, "CONSTRUCTOR TEXT");
|
PF (SEC_CONSTRUCTOR_TEXT, "CONSTRUCTOR TEXT");
|
||||||
@ -359,8 +364,6 @@ objdump_print_address (vma, info)
|
|||||||
long max = sorted_symcount;
|
long max = sorted_symcount;
|
||||||
long thisplace;
|
long thisplace;
|
||||||
|
|
||||||
bfd_signed_vma vardiff;
|
|
||||||
|
|
||||||
fprintf_vma (info->stream, vma);
|
fprintf_vma (info->stream, vma);
|
||||||
|
|
||||||
if (sorted_symcount < 1)
|
if (sorted_symcount < 1)
|
||||||
@ -375,11 +378,9 @@ objdump_print_address (vma, info)
|
|||||||
thisplace = (max + min) / 2;
|
thisplace = (max + min) / 2;
|
||||||
sym = sorted_syms[thisplace];
|
sym = sorted_syms[thisplace];
|
||||||
|
|
||||||
vardiff = bfd_asymbol_value (sym) - vma;
|
if (bfd_asymbol_value (sym) > vma)
|
||||||
|
|
||||||
if (vardiff > 0)
|
|
||||||
max = thisplace;
|
max = thisplace;
|
||||||
else if (vardiff < 0)
|
else if (bfd_asymbol_value (sym) < vma)
|
||||||
min = thisplace;
|
min = thisplace;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -817,6 +818,7 @@ disassemble_data (abfd)
|
|||||||
while (i < disasm_info.buffer_length)
|
while (i < disasm_info.buffer_length)
|
||||||
{
|
{
|
||||||
int bytes;
|
int bytes;
|
||||||
|
boolean need_nl = false;
|
||||||
|
|
||||||
if (data[i] == 0 && data[i + 1] == 0 && data[i + 2] == 0 &&
|
if (data[i] == 0 && data[i + 1] == 0 && data[i + 2] == 0 &&
|
||||||
data[i + 3] == 0)
|
data[i + 3] == 0)
|
||||||
@ -850,7 +852,10 @@ disassemble_data (abfd)
|
|||||||
/* Old style */
|
/* Old style */
|
||||||
bytes = print (section->vma + i, data + i, stdout);
|
bytes = print (section->vma + i, data + i, stdout);
|
||||||
}
|
}
|
||||||
|
if (!wide_output)
|
||||||
putchar ('\n');
|
putchar ('\n');
|
||||||
|
else
|
||||||
|
need_nl = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dump_reloc_info
|
if (dump_reloc_info
|
||||||
@ -895,11 +900,14 @@ disassemble_data (abfd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
|
need_nl = false;
|
||||||
++relpp;
|
++relpp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (need_nl)
|
||||||
|
printf ("\n");
|
||||||
|
|
||||||
i += bytes;
|
i += bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1100,12 +1108,27 @@ dump_section_stabs (abfd, stabsect_name, strsect_name)
|
|||||||
char *stabsect_name;
|
char *stabsect_name;
|
||||||
char *strsect_name;
|
char *strsect_name;
|
||||||
{
|
{
|
||||||
|
asection *s;
|
||||||
if (read_section_stabs (abfd, stabsect_name, strsect_name))
|
if (read_section_stabs (abfd, stabsect_name, strsect_name))
|
||||||
{
|
{
|
||||||
print_section_stabs (abfd, stabsect_name, strsect_name);
|
print_section_stabs (abfd, stabsect_name, strsect_name);
|
||||||
free (stabs);
|
free (stabs);
|
||||||
free (strtab);
|
free (strtab);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check for names which are supersets of the selected name */
|
||||||
|
for (s = abfd->sections;
|
||||||
|
s;
|
||||||
|
s = s->next)
|
||||||
|
{
|
||||||
|
if (strncmp (stabsect_name, s->name, strlen (stabsect_name)) == 0)
|
||||||
|
{
|
||||||
|
read_section_stabs (abfd, s->name, strsect_name);
|
||||||
|
print_section_stabs (abfd, s->name, strsect_name);
|
||||||
|
free (stabs);
|
||||||
|
free (strtab);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1682,7 +1705,7 @@ main (argc, argv)
|
|||||||
|
|
||||||
bfd_init ();
|
bfd_init ();
|
||||||
|
|
||||||
while ((c = getopt_long (argc, argv, "ib:m:VdDlfahrRtTxsSj:", long_options,
|
while ((c = getopt_long (argc, argv, "ib:m:VdDlfahrRtTxsSj:w", long_options,
|
||||||
(int *) 0))
|
(int *) 0))
|
||||||
!= EOF)
|
!= EOF)
|
||||||
{
|
{
|
||||||
@ -1752,6 +1775,9 @@ main (argc, argv)
|
|||||||
case 'V':
|
case 'V':
|
||||||
show_version = 1;
|
show_version = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'w':
|
||||||
|
wide_output = 1;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
usage (stderr, 1);
|
usage (stderr, 1);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user