From a7ee017f36e4d859be083d26e380196a8c02badd Mon Sep 17 00:00:00 2001 From: pfg Date: Sat, 20 Aug 2016 02:18:44 +0000 Subject: [PATCH] MFC r303147 binutils: fix "Bad value" error in bfd for MIPS when using -Bsymbolic. From OpenBSD's log: Inspired by https://sourceware.org/ml/binutils/2010-08/msg00333.html, but expressed differently so there are no GPLv3 issues. Obtained from: OpenBSD (CVS rev. 1.7) git-svn-id: svn://svn.freebsd.org/base/stable/10@304517 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- contrib/binutils/bfd/elfxx-mips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/binutils/bfd/elfxx-mips.c b/contrib/binutils/bfd/elfxx-mips.c index 8f4b05d06..1a49b0c2f 100644 --- a/contrib/binutils/bfd/elfxx-mips.c +++ b/contrib/binutils/bfd/elfxx-mips.c @@ -4801,7 +4801,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd, /* We must now calculate the dynamic symbol table index to use in the relocation. */ if (h != NULL - && (!h->root.def_regular + && (sec == NULL || !h->root.def_regular || (info->shared && !info->symbolic && !h->root.forced_local))) { indx = h->root.dynindx; -- 2.45.0