/* ldmisc.c
- Copyright (C) 1991-2019 Free Software Foundation, Inc.
+ Copyright (C) 1991-2020 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
This file is part of the GNU Binutils.
#include "bfd.h"
#include "bfdlink.h"
#include "libiberty.h"
+#include "ctf-api.h"
#include "safe-ctype.h"
#include "filenames.h"
#include "demangle.h"
unsigned int linenumber;
bfd_boolean discard_last;
bfd_boolean done;
+ bfd_error_type last_bfd_error = bfd_get_error ();
abfd = args[arg_no].reladdr.abfd;
section = args[arg_no].reladdr.sec;
}
if (!done)
lfinfo (fp, "(%pA+0x%v)", section, offset);
+ bfd_set_error (last_bfd_error);
if (discard_last)
{
fprintf (fp, "%s generated", program_name);
else if (abfd->my_archive != NULL
&& !bfd_is_thin_archive (abfd->my_archive))
- fprintf (fp, "%s(%s)", abfd->my_archive->filename,
- abfd->filename);
+ fprintf (fp, "%s(%s)",
+ bfd_get_filename (abfd->my_archive),
+ bfd_get_filename (abfd));
else
- fprintf (fp, "%s", abfd->filename);
+ fprintf (fp, "%s", bfd_get_filename (abfd));
}
else if (*fmt == 'I')
{
if (i->the_bfd != NULL
&& i->the_bfd->my_archive != NULL
&& !bfd_is_thin_archive (i->the_bfd->my_archive))
- fprintf (fp, "(%s)%s", i->the_bfd->my_archive->filename,
+ fprintf (fp, "(%s)%s",
+ bfd_get_filename (i->the_bfd->my_archive),
i->local_sym_name);
else
fprintf (fp, "%s", i->filename);