# This shell script emits a C file. -*- C -*-
-# Copyright (C) 2012-2014 Free Software Foundation, Inc.
+# Copyright (C) 2012-2017 Free Software Foundation, Inc.
# Contributed by Andes Technology Corporation.
#
# This file is part of the GNU Binutils.
fragment <<EOF
-#include "libbfd.h"
#include "elf-bfd.h"
#include "elf/nds32.h"
#include "bfd_stdint.h"
if (strstr (bfd_get_target (link_info.output_bfd), "nds32") == NULL)
{
/* Check the output target is nds32. */
- einfo ("%F%X%P: error: Cannot change output format whilst "
- "linking NDS32 binaries.\n");
+ einfo (_("%F%X%P: error: Cannot change output format whilst "
+ "linking NDS32 binaries.\n"));
return;
}
static void
nds32_elf_after_parse (void)
{
- if (link_info.relocatable)
+ if (bfd_link_relocatable (&link_info))
DISABLE_RELAXATION;
if (!RELAXATION_ENABLED)
else
update_ex9_table = 0;
- if (link_info.shared)
+ if (bfd_link_pic (&link_info))
{
target_optimize = target_optimize & (!NDS32_RELAX_JUMP_IFC_ON);
target_optimize = target_optimize & (!NDS32_RELAX_EX9_ON);
}
- after_parse_default ();
+ gld${EMULATION_NAME}_after_parse ();
}
static void
/* Check object files if the target is dynamic linked executable
or shared object. */
if (elf_hash_table (&link_info)->dynamic_sections_created
- || link_info.shared || link_info.pie)
+ || bfd_link_pic (&link_info))
{
for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next)
{
if (!(elf_elfheader (abfd)->e_flags & E_NDS32_HAS_PIC))
{
/* Non-PIC object file is used. */
- if (link_info.shared || link_info.pie)
+ if (bfd_link_pic (&link_info))
{
/* For PIE or shared object, all input must be PIC. */
einfo (_("%B: must use -fpic to compile this file "
{
/* Initialize ex9 hash table. */
if (!nds32_elf_ex9_init ())
- return;
+ return;
}
/* Call default after allocation callback.
'
PARSE_AND_LIST_ARGS_CASES='
case OPTION_BASELINE:
- einfo ("%P: --mbaseline is not used anymore.\n");
+ einfo (_("%P: --mbaseline is not used anymore.\n"));
break;
case OPTION_ELIM_GC_RELOCS:
eliminate_gc_relocs = 1;
break;
case OPTION_REDUCE_FP_UPDATE:
case OPTION_NO_REDUCE_FP_UPDATE:
- einfo ("%P: --relax-[no-]reduce-fp-updat is not used anymore.\n");
+ einfo (_("%P: --relax-[no-]reduce-fp-updat is not used anymore.\n"));
break;
case OPTION_EXPORT_SYMBOLS:
if (!optarg)