# This shell script emits a C file. -*- C -*-
-# Copyright (C) 2007-2018 Free Software Foundation, Inc.
+# Copyright (C) 2007-2020 Free Software Foundation, Inc.
# Contributed by M R Swami Reddy <MR.Swami.Reddy@nsc.com>
#
# This file is part of the GNU Binutils.
# MA 02110-1301, USA.
#
-# This file is sourced from elf32.em, and defines extra cr16-elf
+# This file is sourced from elf.em, and defines extra cr16-elf
# specific routines.
#
fragment <<EOF
#include "ldctor.h"
+#include "elf32-cr16.h"
static void check_sections (bfd *, asection *, void *);
COFF and ELF. */
if (bfd_get_flavour (abfd) != bfd_target_coff_flavour
&& bfd_get_flavour (abfd) != bfd_target_elf_flavour)
- einfo (_("%F%B: all input objects must be COFF or ELF "
+ einfo (_("%F%P: %pB: all input objects must be COFF or ELF "
"for --embedded-relocs\n"));
datasec = bfd_get_section_by_name (abfd, ".data.rel");
relsec = bfd_make_section (abfd, ".emreloc");
if (relsec == NULL
- || ! bfd_set_section_flags (abfd, relsec,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY))
- || ! bfd_set_section_alignment (abfd, relsec, 2)
- || ! bfd_set_section_size (abfd, relsec,
- datasec->reloc_count * 8))
- einfo (_("%F%B: can not create .emreloc section: %E\n"));
+ || !bfd_set_section_flags (relsec, (SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY))
+ || !bfd_set_section_alignment (relsec, 2)
+ || !bfd_set_section_size (relsec, datasec->reloc_count * 8))
+ einfo (_("%F%P: %pB: can not create .emreloc section: %E\n"));
}
/* Double check that all other data sections are empty, as is
static void
check_sections (bfd *abfd, asection *sec, void *datasec)
{
- if ((strncmp (bfd_get_section_name (abfd, sec), ".data.rel", 9) == 0)
+ if ((strncmp (bfd_section_name (sec), ".data.rel", 9) == 0)
&& sec != datasec
&& sec->reloc_count == 0 )
- einfo (_("%B%X: section %s has relocs; can not use --embedded-relocs\n"),
- abfd, bfd_get_section_name (abfd, sec));
+ einfo (_("%X%P: %pB: section %s has relocs; can not use --embedded-relocs\n"),
+ abfd, bfd_section_name (sec));
}
static void
is true the link sometimes fails. */
config.magic_demand_paged = FALSE;
- gld${EMULATION_NAME}_after_parse ();
+ ldelf_after_parse ();
}
/* This is called after the sections have been attached to output
&errmsg))
{
if (errmsg == NULL)
- einfo (_("%B%X: can not create runtime reloc information: %E\n"),
+ einfo (_("%X%P: %pB: can not create runtime reloc information: %E\n"),
abfd);
else
- einfo (_("%X%B: can not create runtime reloc information: %s\n"),
+ einfo (_("%X%P: %pB: can not create runtime reloc information: %s\n"),
abfd, errmsg);
}
}