mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-12-18 01:27:05 +00:00
* as.h (as_perror): Delete declaration.
* gdbinit.in (as_perror): Delete breakpoint. * messages.c (as_perror): Delete function. * doc/internals.texi: Remove as_perror description. * listing.c (listing_print: Don't use as_perror. * output-file.c (output_file_create, output_file_close): Likewise. * symbols.c (symbol_create, symbol_clone): Likewise. * write.c (write_contents): Likewise. * config/obj-som.c (obj_som_version, obj_som_copyright): Likewise. * config/tc-tic54x.c (tic54x_mlib): Likewise.
This commit is contained in:
parent
3aeeedbb71
commit
885afe7b6f
@ -1,3 +1,16 @@
|
|||||||
|
2006-09-22 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* as.h (as_perror): Delete declaration.
|
||||||
|
* gdbinit.in (as_perror): Delete breakpoint.
|
||||||
|
* messages.c (as_perror): Delete function.
|
||||||
|
* doc/internals.texi: Remove as_perror description.
|
||||||
|
* listing.c (listing_print: Don't use as_perror.
|
||||||
|
* output-file.c (output_file_create, output_file_close): Likewise.
|
||||||
|
* symbols.c (symbol_create, symbol_clone): Likewise.
|
||||||
|
* write.c (write_contents): Likewise.
|
||||||
|
* config/obj-som.c (obj_som_version, obj_som_copyright): Likewise.
|
||||||
|
* config/tc-tic54x.c (tic54x_mlib): Likewise.
|
||||||
|
|
||||||
2006-09-22 Alan Modra <amodra@bigpond.net.au>
|
2006-09-22 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* config/tc-ppc.c (md_section_align): Don't round up address for ELF.
|
* config/tc-ppc.c (md_section_align): Don't round up address for ELF.
|
||||||
|
3
gas/as.h
3
gas/as.h
@ -1,6 +1,6 @@
|
|||||||
/* as.h - global header file
|
/* as.h - global header file
|
||||||
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
||||||
1999, 2000, 2001, 2002, 2003, 2004, 2005
|
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GAS, the GNU Assembler.
|
This file is part of GAS, the GNU Assembler.
|
||||||
@ -544,7 +544,6 @@ void cond_finish_check (int);
|
|||||||
void cond_exit_macro (int);
|
void cond_exit_macro (int);
|
||||||
int seen_at_least_1_file (void);
|
int seen_at_least_1_file (void);
|
||||||
void app_pop (char *);
|
void app_pop (char *);
|
||||||
void as_perror (const char *, const char *);
|
|
||||||
void as_where (char **, unsigned int *);
|
void as_where (char **, unsigned int *);
|
||||||
void bump_line_counters (void);
|
void bump_line_counters (void);
|
||||||
void do_scrub_begin (int);
|
void do_scrub_begin (int);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* SOM object file format.
|
/* SOM object file format.
|
||||||
Copyright 1993, 1994, 1998, 2000, 2002, 2003, 2004, 2005
|
Copyright 1993, 1994, 1998, 2000, 2002, 2003, 2004, 2005, 2006
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GAS, the GNU Assembler.
|
This file is part of GAS, the GNU Assembler.
|
||||||
@ -150,12 +150,9 @@ obj_som_version (int unused ATTRIBUTE_UNUSED)
|
|||||||
|
|
||||||
version_seen = 1;
|
version_seen = 1;
|
||||||
if (!bfd_som_attach_aux_hdr (stdoutput, VERSION_AUX_ID, version))
|
if (!bfd_som_attach_aux_hdr (stdoutput, VERSION_AUX_ID, version))
|
||||||
{
|
as_fatal (_("attaching version header %s: %s"),
|
||||||
bfd_perror (stdoutput->filename);
|
stdoutput->filename, bfd_errmsg (bfd_get_error ()));
|
||||||
as_perror (_("FATAL: Attaching version header %s"),
|
|
||||||
stdoutput->filename);
|
|
||||||
exit (EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
*input_line_pointer = c;
|
*input_line_pointer = c;
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
}
|
}
|
||||||
@ -195,12 +192,9 @@ obj_som_copyright (int unused ATTRIBUTE_UNUSED)
|
|||||||
|
|
||||||
copyright_seen = 1;
|
copyright_seen = 1;
|
||||||
if (!bfd_som_attach_aux_hdr (stdoutput, COPYRIGHT_AUX_ID, copyright))
|
if (!bfd_som_attach_aux_hdr (stdoutput, COPYRIGHT_AUX_ID, copyright))
|
||||||
{
|
as_fatal (_("attaching copyright header %s: %s"),
|
||||||
bfd_perror (stdoutput->filename);
|
stdoutput->filename, bfd_errmsg (bfd_get_error ()));
|
||||||
as_perror (_("FATAL: Attaching copyright header %s"),
|
|
||||||
stdoutput->filename);
|
|
||||||
exit (EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
*input_line_pointer = c;
|
*input_line_pointer = c;
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
}
|
}
|
||||||
|
@ -2512,8 +2512,8 @@ tic54x_mlib (ignore)
|
|||||||
abfd = bfd_openr (path, NULL);
|
abfd = bfd_openr (path, NULL);
|
||||||
if (!abfd)
|
if (!abfd)
|
||||||
{
|
{
|
||||||
as_bad (_("Can't open macro library file '%s' for reading."), path);
|
as_bad (_("can't open macro library file '%s' for reading: %s"),
|
||||||
as_perror ("%s", path);
|
path, bfd_errmsg (bfd_get_error ()));
|
||||||
ignore_rest_of_line ();
|
ignore_rest_of_line ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
\input texinfo
|
\input texinfo
|
||||||
@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||||
@c 2001, 2002, 2003, 2004, 2005
|
@c 2001, 2002, 2003, 2004, 2005, 2006
|
||||||
@c Free Software Foundation, Inc.
|
@c Free Software Foundation, Inc.
|
||||||
@setfilename internals.info
|
@setfilename internals.info
|
||||||
@node Top
|
@node Top
|
||||||
@ -1844,10 +1844,6 @@ Returns non-zero if any warnings or errors, respectively, have been printed
|
|||||||
during this invocation.
|
during this invocation.
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
|
||||||
@deftypefun @{@} void as_perror (const char *@var{gripe}, const char *@var{filename})
|
|
||||||
Displays a BFD or system error, then clears the error status.
|
|
||||||
@end deftypefun
|
|
||||||
|
|
||||||
@deftypefun @{@} void as_tsktsk (const char *@var{format}, ...)
|
@deftypefun @{@} void as_tsktsk (const char *@var{format}, ...)
|
||||||
@deftypefunx @{@} void as_warn (const char *@var{format}, ...)
|
@deftypefunx @{@} void as_warn (const char *@var{format}, ...)
|
||||||
@deftypefunx @{@} void as_bad (const char *@var{format}, ...)
|
@deftypefunx @{@} void as_bad (const char *@var{format}, ...)
|
||||||
|
@ -6,7 +6,6 @@ break as_warn_where
|
|||||||
break as_bad
|
break as_bad
|
||||||
break as_bad_where
|
break as_bad_where
|
||||||
break as_fatal
|
break as_fatal
|
||||||
break as_perror
|
|
||||||
break as_assert
|
break as_assert
|
||||||
break as_abort
|
break as_abort
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* listing.c - maintain assembly listings
|
/* listing.c - maintain assembly listings
|
||||||
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||||
2001, 2002, 2003, 2005
|
2001, 2002, 2003, 2005, 2006
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GAS, the GNU Assembler.
|
This file is part of GAS, the GNU Assembler.
|
||||||
@ -1076,8 +1076,7 @@ listing_print (char *name)
|
|||||||
using_stdout = 0;
|
using_stdout = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bfd_set_error (bfd_error_system_call);
|
as_warn (_("can't open %s: %s"), name, xstrerror (errno));
|
||||||
as_perror (_("can't open list file: %s"), name);
|
|
||||||
list_file = stdout;
|
list_file = stdout;
|
||||||
using_stdout = 1;
|
using_stdout = 1;
|
||||||
}
|
}
|
||||||
@ -1095,10 +1094,7 @@ listing_print (char *name)
|
|||||||
if (! using_stdout)
|
if (! using_stdout)
|
||||||
{
|
{
|
||||||
if (fclose (list_file) == EOF)
|
if (fclose (list_file) == EOF)
|
||||||
{
|
as_warn (_("can't close %s: %s"), name, xstrerror (errno));
|
||||||
bfd_set_error (bfd_error_system_call);
|
|
||||||
as_perror (_("error closing list file: %s"), name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (last_open_file)
|
if (last_open_file)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* messages.c - error reporter -
|
/* messages.c - error reporter -
|
||||||
Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001,
|
Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001,
|
||||||
2003, 2004, 2005
|
2003, 2004, 2005, 2006
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
This file is part of GAS, the GNU Assembler.
|
This file is part of GAS, the GNU Assembler.
|
||||||
|
|
||||||
@ -116,24 +116,6 @@ as_show_where (void)
|
|||||||
fprintf (stderr, "%s:%u: ", file, line);
|
fprintf (stderr, "%s:%u: ", file, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Like perror(3), but with more info. */
|
|
||||||
|
|
||||||
void
|
|
||||||
as_perror (const char *gripe, /* Unpunctuated error theme. */
|
|
||||||
const char *filename)
|
|
||||||
{
|
|
||||||
const char *errtxt;
|
|
||||||
int saved_errno = errno;
|
|
||||||
|
|
||||||
as_show_where ();
|
|
||||||
fprintf (stderr, gripe, filename);
|
|
||||||
errno = saved_errno;
|
|
||||||
errtxt = bfd_errmsg (bfd_get_error ());
|
|
||||||
fprintf (stderr, ": %s\n", errtxt);
|
|
||||||
errno = 0;
|
|
||||||
bfd_set_error (bfd_error_no_error);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Send to stderr a string as a warning, and locate warning
|
/* Send to stderr a string as a warning, and locate warning
|
||||||
in input file(s).
|
in input file(s).
|
||||||
Please only use this for when we have some recovery action.
|
Please only use this for when we have some recovery action.
|
||||||
|
@ -36,11 +36,12 @@ output_file_create (char *name)
|
|||||||
|
|
||||||
else if (!(stdoutput = bfd_openw (name, TARGET_FORMAT)))
|
else if (!(stdoutput = bfd_openw (name, TARGET_FORMAT)))
|
||||||
{
|
{
|
||||||
if (bfd_get_error () == bfd_error_invalid_target)
|
bfd_error_type err = bfd_get_error ();
|
||||||
as_perror (_("Selected target format '%s' unknown"), TARGET_FORMAT);
|
|
||||||
|
if (err == bfd_error_invalid_target)
|
||||||
|
as_fatal (_("selected target format '%s' unknown"), TARGET_FORMAT);
|
||||||
else
|
else
|
||||||
as_perror (_("FATAL: can't create %s"), name);
|
as_fatal (_("can't create %s: %s"), name, bfd_errmsg (err));
|
||||||
exit (EXIT_FAILURE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bfd_set_format (stdoutput, bfd_object);
|
bfd_set_format (stdoutput, bfd_object);
|
||||||
@ -53,11 +54,8 @@ void
|
|||||||
output_file_close (char *filename)
|
output_file_close (char *filename)
|
||||||
{
|
{
|
||||||
/* Close the bfd. */
|
/* Close the bfd. */
|
||||||
if (bfd_close (stdoutput) == 0)
|
if (!bfd_close (stdoutput))
|
||||||
{
|
as_fatal (_("can't close %s: %s"), filename,
|
||||||
bfd_perror (filename);
|
bfd_errmsg (bfd_get_error ()));
|
||||||
as_perror (_("FATAL: can't close %s\n"), filename);
|
|
||||||
exit (EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
stdoutput = NULL; /* Trust nobody! */
|
stdoutput = NULL; /* Trust nobody! */
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* symbols.c -symbol table-
|
/* symbols.c -symbol table-
|
||||||
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
||||||
1999, 2000, 2001, 2002, 2003, 2004, 2005
|
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GAS, the GNU Assembler.
|
This file is part of GAS, the GNU Assembler.
|
||||||
@ -144,7 +144,7 @@ symbol_create (const char *name, /* It is copied, the caller can destroy/modify.
|
|||||||
|
|
||||||
symbolP->bsym = bfd_make_empty_symbol (stdoutput);
|
symbolP->bsym = bfd_make_empty_symbol (stdoutput);
|
||||||
if (symbolP->bsym == NULL)
|
if (symbolP->bsym == NULL)
|
||||||
as_perror ("%s", "bfd_make_empty_symbol");
|
as_fatal ("bfd_make_empty_symbol: %s", bfd_errmsg (bfd_get_error ()));
|
||||||
symbolP->bsym->udata.p = (PTR) symbolP;
|
symbolP->bsym->udata.p = (PTR) symbolP;
|
||||||
S_SET_NAME (symbolP, preserved_copy_of_name);
|
S_SET_NAME (symbolP, preserved_copy_of_name);
|
||||||
|
|
||||||
@ -570,7 +570,7 @@ symbol_clone (symbolS *orgsymP, int replace)
|
|||||||
*newsymP = *orgsymP;
|
*newsymP = *orgsymP;
|
||||||
bsymnew = bfd_make_empty_symbol (bfd_asymbol_bfd (bsymorg));
|
bsymnew = bfd_make_empty_symbol (bfd_asymbol_bfd (bsymorg));
|
||||||
if (bsymnew == NULL)
|
if (bsymnew == NULL)
|
||||||
as_perror ("%s", "bfd_make_empty_symbol");
|
as_fatal ("bfd_make_empty_symbol: %s", bfd_errmsg (bfd_get_error ()));
|
||||||
newsymP->bsym = bsymnew;
|
newsymP->bsym = bsymnew;
|
||||||
bsymnew->name = bsymorg->name;
|
bsymnew->name = bsymorg->name;
|
||||||
bsymnew->flags = bsymorg->flags;
|
bsymnew->flags = bsymorg->flags;
|
||||||
|
15
gas/write.c
15
gas/write.c
@ -1014,11 +1014,8 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED,
|
|||||||
f->fr_literal, (file_ptr) offset,
|
f->fr_literal, (file_ptr) offset,
|
||||||
(bfd_size_type) f->fr_fix);
|
(bfd_size_type) f->fr_fix);
|
||||||
if (!x)
|
if (!x)
|
||||||
{
|
as_fatal (_("can't write %s: %s"), stdoutput->filename,
|
||||||
bfd_perror (stdoutput->filename);
|
bfd_errmsg (bfd_get_error ()));
|
||||||
as_perror (_("FATAL: Can't write %s"), stdoutput->filename);
|
|
||||||
exit (EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
offset += f->fr_fix;
|
offset += f->fr_fix;
|
||||||
}
|
}
|
||||||
fill_literal = f->fr_literal + f->fr_fix;
|
fill_literal = f->fr_literal + f->fr_fix;
|
||||||
@ -1038,12 +1035,8 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED,
|
|||||||
(file_ptr) offset,
|
(file_ptr) offset,
|
||||||
(bfd_size_type) fill_size);
|
(bfd_size_type) fill_size);
|
||||||
if (!x)
|
if (!x)
|
||||||
{
|
as_fatal (_("can't write %s: %s"), stdoutput->filename,
|
||||||
bfd_perror (stdoutput->filename);
|
bfd_errmsg (bfd_get_error ()));
|
||||||
as_perror (_("FATAL: Can't write %s"),
|
|
||||||
stdoutput->filename);
|
|
||||||
exit (EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
offset += fill_size;
|
offset += fill_size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user