summaryrefslogtreecommitdiffstats
path: root/contrib/binutils
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2014-10-04 13:14:37 +0000
committerandrew <andrew@FreeBSD.org>2014-10-04 13:14:37 +0000
commitd562a94d204913fbfec618a33d393fc3b329d995 (patch)
treed972816346fd6103f04ffce3128f47c66e4173b4 /contrib/binutils
parentea0abe86308bd88ffb5d73baff761dc9a554f6da (diff)
downloadFreeBSD-src-d562a94d204913fbfec618a33d393fc3b329d995.zip
FreeBSD-src-d562a94d204913fbfec618a33d393fc3b329d995.tar.gz
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.
Diffstat (limited to 'contrib/binutils')
-rw-r--r--contrib/binutils/gas/config/tc-arm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/binutils/gas/config/tc-arm.c b/contrib/binutils/gas/config/tc-arm.c
index 1d9e27c..8b470c0 100644
--- a/contrib/binutils/gas/config/tc-arm.c
+++ b/contrib/binutils/gas/config/tc-arm.c
@@ -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) */
OpenPOWER on IntegriCloud