From 13161072f26833dbdc33d47fe1e0de82f20f47ea Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Wed, 18 Jul 2007 21:06:06 +0000 Subject: [PATCH] * elf32-xtensa.c (xtensa_callback_required_dependence): Ignore non-ELF sections. --- bfd/ChangeLog | 5 +++++ bfd/elf32-xtensa.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 488344320ee..81a8fd487e1 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2007-07-18 Bob Wilson + + * elf32-xtensa.c (xtensa_callback_required_dependence): Ignore + non-ELF sections. + 2007-07-18 Bob Wilson * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Get section diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c index 1182bd9de6d..2531df5810d 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c @@ -9805,6 +9805,11 @@ xtensa_callback_required_dependence (bfd *abfd, (*callback) (sec, sec_size, sgotplt, 0, closure); } + /* Only ELF files are supported for Xtensa. Check here to avoid a segfault + when building uclibc, which runs "ld -b binary /dev/null". */ + if (bfd_get_flavour (abfd) != bfd_target_elf_flavour) + return ok; + internal_relocs = retrieve_internal_relocs (abfd, sec, link_info->keep_memory); if (internal_relocs == NULL -- 2.30.2