2 2004-07-01 Nick Clifton <nickc@redhat.com>
4 * config/tc-arm.c (md_apply_fix3:BFD_RELOC_ARM_IMMEDIATE): Do not
5 allow values which have come from undefined symbols.
6 Always consider this fixup to have been processed as a reloc
7 cannot be generated for it.
10 Index: gas/config/tc-arm.c
11 ===================================================================
12 RCS file: /work/repositories/sourceware/src/gas/config/tc-arm.c,v
13 retrieving revision 1.140.2.1
14 diff -c -3 -p -r1.140.2.1 tc-arm.c
15 *** gas/config/tc-arm.c 13 Jun 2003 16:34:31 -0000 1.140.2.1
16 --- gas/config/tc-arm.c 1 Jul 2004 17:22:43 -0000
17 *************** md_apply_fix3 (fixP, valP, seg)
20 switch (fixP->fx_r_type)
22 case BFD_RELOC_ARM_IMMEDIATE:
23 + /* We claim that this fixup has been processed here,
24 + even if in fact we generate an error because we do
25 + not have a reloc for it, so tc_gen_reloc will reject it. */
29 + && ! S_IS_DEFINED (fixP->fx_addsy))
31 + as_bad_where (fixP->fx_file, fixP->fx_line,
32 + _("undefined symbol %s used as an immediate value"),
33 + S_GET_NAME (fixP->fx_addsy));
37 newimm = validate_immediate (value);
38 temp = md_chars_to_number (buf, INSN_SIZE);
40 *************** md_apply_fix3 (fixP, valP, seg)
43 newimm |= (temp & 0xfffff000);
44 md_number_to_chars (buf, (valueT) newimm, INSN_SIZE);
48 case BFD_RELOC_ARM_ADRL_IMMEDIATE: