mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 04:00:07 +08:00
Use the new architecture functions
This commit is contained in:
@ -104,11 +104,11 @@ bfd *obfd;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Copy architecture of input file to output file */
|
/* Copy architecture of input file to output file */
|
||||||
if (!bfd_set_arch_mach(obfd, bfd_get_architecture(ibfd),
|
if (!bfd_set_arch_mach(obfd, bfd_get_arch(ibfd),
|
||||||
bfd_get_machine(ibfd))) {
|
bfd_get_mach(ibfd))) {
|
||||||
fprintf(stderr, "Output file cannot represent architecture %s\n",
|
fprintf(stderr, "Output file cannot represent architecture %s\n",
|
||||||
bfd_printable_arch_mach(bfd_get_architecture(ibfd),
|
bfd_printable_arch_mach(bfd_get_arch(ibfd),
|
||||||
bfd_get_machine(ibfd)));
|
bfd_get_mach(ibfd)));
|
||||||
}
|
}
|
||||||
if (!bfd_set_format(obfd, bfd_get_format(ibfd)))
|
if (!bfd_set_format(obfd, bfd_get_format(ibfd)))
|
||||||
{
|
{
|
||||||
@ -357,6 +357,8 @@ main(argc, argv)
|
|||||||
|
|
||||||
program_name = argv[0];
|
program_name = argv[0];
|
||||||
|
|
||||||
|
bfd_init();
|
||||||
|
|
||||||
if (strcmp(program_name,"strip") == 0) {
|
if (strcmp(program_name,"strip") == 0) {
|
||||||
strip = true;
|
strip = true;
|
||||||
}
|
}
|
||||||
|
@ -83,6 +83,8 @@ main (argc, argv)
|
|||||||
int c;
|
int c;
|
||||||
program_name = argv[0];
|
program_name = argv[0];
|
||||||
|
|
||||||
|
bfd_init();
|
||||||
|
|
||||||
strip_symbols = strip_undef; /* default is to strip everything. */
|
strip_symbols = strip_undef; /* default is to strip everything. */
|
||||||
discard_locals = locals_undef;
|
discard_locals = locals_undef;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user