# This shell script emits a C file. -*- C -*-
-# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 2000-2016 Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
#
if (cranges != NULL)
{
- if (command_line.relax)
+ if (RELAXATION_ENABLED)
{
/* FIXME: Look through incoming sections with .cranges
descriptors, build up some kind of descriptors that the
}
}
- command_line.relax = FALSE;
+ DISABLE_RELAXATION;
}
/* We wouldn't need to do anything when there's already a .cranges
.cranges section. */
}
- if (command_line.relax)
+ if (RELAXATION_ENABLED)
{
LANG_FOR_EACH_INPUT_STATEMENT (f)
{
if (bfd_get_flavour (f->the_bfd) == bfd_target_elf_flavour)
{
asection *isec;
+
for (isec = f->the_bfd->sections;
isec != NULL;
isec = isec->next)
{
einfo (_("%P: Sorry, turning off relaxing: SHmedia sections present.\n"));
einfo (" %I\n", f);
- command_line.relax = FALSE;
+ DISABLE_RELAXATION;
goto done_scanning_shmedia_sections;
}
}
gld${EMULATION_NAME}_after_allocation ();
+ /* Needed, since we create link_orders here. */
+ lang_clear_os_map ();
+
cranges = bfd_get_section_by_name (link_info.output_bfd,
SH64_CRANGES_SECTION_NAME);
/* If we emit relocatable contents, we need a
relocation for the start address. */
- if (link_info.relocatable || link_info.emitrelocations)
+ if (bfd_link_relocatable (&link_info)
+ || link_info.emitrelocations)
{
/* FIXME: We could perhaps use lang_add_reloc and
friends here, but I'm not really sure that
cranges->size = crangesp - cranges->contents;
cranges->rawsize = cranges->size;
}
+EOF
+
+