# This shell script emits a C file. -*- C -*-
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright (C) 2013-2016 Free Software Foundation, Inc.
#
# This file is part of GNU Binutils.
#
static void
metagelf_create_output_section_statements (void)
{
- extern const bfd_target bfd_elf32_metag_vec;
+ extern const bfd_target metag_elf32_vec;
- if (link_info.output_bfd->xvec != &bfd_elf32_metag_vec)
+ if (link_info.output_bfd->xvec != &metag_elf32_vec)
return;
stub_file = lang_add_input_file ("linker stubs",
static void
gld${EMULATION_NAME}_after_allocation (void)
{
+ int ret;
+
/* bfd_elf_discard_info just plays with data and debugging sections,
ie. doesn't affect code size, so we can delay resizing the
sections. It's likely we'll resize everything in the process of
adding stubs. */
- if (bfd_elf_discard_info (link_info.output_bfd, &link_info))
+ ret = bfd_elf_discard_info (link_info.output_bfd, &link_info);
+ if (ret < 0)
+ {
+ einfo ("%X%P: .eh_frame/.stab edit: %E\n");
+ return;
+ }
+ else if (ret > 0)
need_laying_out = 1;
/* If generating a relocatable output file, then we don't
have to examine the relocs. */
- if (stub_file != NULL && !link_info.relocatable)
+ if (stub_file != NULL && !bfd_link_relocatable (&link_info))
{
- int ret = elf_metag_setup_section_lists (link_info.output_bfd,
- &link_info);
-
+ ret = elf_metag_setup_section_lists (link_info.output_bfd, &link_info);
if (ret != 0)
{
if (ret < 0)
if (need_laying_out != -1)
gld${EMULATION_NAME}_map_segments (need_laying_out);
- if (! link_info.relocatable)
+ if (!bfd_link_relocatable (&link_info))
{
/* Now build the linker stubs. */
if (stub_file != NULL && stub_file->the_bfd->sections != NULL)