X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=ld%2Femultempl%2Fxtensaelf.em;h=0b11fdcd6988c7b0b90c3c5295e41c1b56b8794d;hb=f81e7e2db6d1aaf47561e54356aee12b585533c2;hp=2fc31eb5bbcb92635478e606bd558f655cfc7964;hpb=219d1afa89d0d53ca93a684cac341f16470f3ca0;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em index 2fc31eb5bb..0b11fdcd69 100644 --- a/ld/emultempl/xtensaelf.em +++ b/ld/emultempl/xtensaelf.em @@ -1,5 +1,5 @@ # This shell script emits a C file. -*- C -*- -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2019 Free Software Foundation, Inc. # # This file is part of the GNU Binutils. # @@ -19,7 +19,7 @@ # MA 02110-1301, USA. # -# This file is sourced from elf32.em, and defines extra xtensa-elf +# This file is sourced from elf.em, and defines extra xtensa-elf # specific routines. # fragment <size); if (! bfd_get_section_contents (abfd, info_sec, data, 0, info_sec->size)) - einfo (_("%F%P:%B: cannot read contents of section %A\n"), abfd, info_sec); + einfo (_("%F%P: %pB: cannot read contents of section %pA\n"), abfd, info_sec); if (info_sec->size > 24 && info_sec->size >= 24 + bfd_get_32 (abfd, data + 4) @@ -395,11 +395,11 @@ check_xtensa_info (bfd *abfd, asection *info_sec) &mismatch, &errmsg)) { if (mismatch) - einfo (_("%P:%B: warning: incompatible Xtensa configuration (%s)\n"), + einfo (_("%P: %pB: warning: incompatible Xtensa configuration (%s)\n"), abfd, errmsg); } else - einfo (_("%P:%B: warning: cannot parse .xtensa.info section\n"), abfd); + einfo (_("%P: %pB: warning: cannot parse .xtensa.info section\n"), abfd); free (data); } @@ -450,7 +450,7 @@ elf_xtensa_before_allocation (void) cannot go any further if there are any mismatches. */ if ((is_big_endian && f->the_bfd->xvec->byteorder == BFD_ENDIAN_LITTLE) || (!is_big_endian && f->the_bfd->xvec->byteorder == BFD_ENDIAN_BIG)) - einfo (_("%F%P: cross-endian linking for %B not supported\n"), + einfo (_("%F%P: cross-endian linking for %pB not supported\n"), f->the_bfd); if (! first_bfd) @@ -596,8 +596,12 @@ xtensa_get_section_deps (const reloc_deps_graph *deps ATTRIBUTE_UNUSED, /* We have a separate function for this so that we could in the future keep a completely independent structure that maps a section to its dependence edges. - For now, we place these in the sec->userdata field. */ - reloc_deps_section *sec_deps = sec->userdata; + For now, we place these in the sec->userdata field. + This doesn't clash with ldlang.c use of userdata for output + sections, and during map output for input sections, since the + xtensa use is only for input sections and only extant in + before_allocation. */ + reloc_deps_section *sec_deps = bfd_section_userdata (sec); return sec_deps; } @@ -606,7 +610,7 @@ xtensa_set_section_deps (const reloc_deps_graph *deps ATTRIBUTE_UNUSED, asection *sec, reloc_deps_section *deps_section) { - sec->userdata = deps_section; + bfd_set_section_userdata (sec, deps_section); } @@ -1293,10 +1297,10 @@ static bfd_boolean is_inconsistent_linkonce_section (asection *sec) { bfd *abfd = sec->owner; - const char *sec_name = bfd_get_section_name (abfd, sec); + const char *sec_name = bfd_section_name (sec); const char *name; - if ((bfd_get_section_flags (abfd, sec) & SEC_LINK_ONCE) == 0 + if ((bfd_section_flags (sec) & SEC_LINK_ONCE) == 0 || strncmp (sec_name, ".gnu.linkonce.", linkonce_len) != 0) return FALSE;