Date: Sat, 4 Oct 2014 13:14:37 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272519 - head/contrib/binutils/gas/config Message-ID: <201410041314.s94DEbrq045805@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Sat Oct 4 13:14:37 2014 New Revision: 272519 URL: https://svnweb.freebsd.org/changeset/base/272519 Log: Add movw and movt relocations to the list of relocations against function names that must nnot be adjusted. This fixes a bug where code such as: movw r2, :lower16:symbol movt r2, :upper16:symbol It is common for clang to generate such code when targeting armv7. Modified: head/contrib/binutils/gas/config/tc-arm.c Modified: head/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- head/contrib/binutils/gas/config/tc-arm.c Sat Oct 4 12:46:26 2014 (r272518) +++ head/contrib/binutils/gas/config/tc-arm.c Sat Oct 4 13:14:37 2014 (r272519) @@ -19395,6 +19395,12 @@ arm_fix_adjustable (fixS * fixP) || fixP->fx_r_type == BFD_RELOC_ARM_LDR_PC_G0) return 0; + if (fixP->fx_r_type == BFD_RELOC_ARM_MOVW + || fixP->fx_r_type == BFD_RELOC_ARM_MOVT + || fixP->fx_r_type == BFD_RELOC_ARM_THUMB_MOVW + || fixP->fx_r_type == BFD_RELOC_ARM_THUMB_MOVT) + return 0; + return 1; } #endif /* defined (OBJ_ELF) || defined (OBJ_COFF) */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410041314.s94DEbrq045805>