+2009-03-18 Andrew Stubbs <ams@codesourcery.com>
+
+ * config/tc-arm.c (md_apply_fix): Check BFD_RELOC_ARM_IMMEDIATE and
+ BFD_RELOC_ARM_ADRL_IMMEDIATE value is in the correct section.
+ Check BFD_RELOC_ARM_ADRL_IMMEDIATE has a defined symbol.
+
2009-03-18 Alan Modra <amodra@bigpond.net.au>
* as.h: Include alloca-conf.h instead of config.h and remove
break;
}
+ if (fixP->fx_addsy
+ && S_GET_SEGMENT (fixP->fx_addsy) != seg)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("symbol %s is in a different section"),
+ S_GET_NAME (fixP->fx_addsy));
+ break;
+ }
+
newimm = encode_arm_immediate (value);
temp = md_chars_to_number (buf, INSN_SIZE);
unsigned int highpart = 0;
unsigned int newinsn = 0xe1a00000; /* nop. */
+ if (fixP->fx_addsy
+ && ! S_IS_DEFINED (fixP->fx_addsy))
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("undefined symbol %s used as an immediate value"),
+ S_GET_NAME (fixP->fx_addsy));
+ break;
+ }
+
+ if (fixP->fx_addsy
+ && S_GET_SEGMENT (fixP->fx_addsy) != seg)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("symbol %s is in a different section"),
+ S_GET_NAME (fixP->fx_addsy));
+ break;
+ }
+
newimm = encode_arm_immediate (value);
temp = md_chars_to_number (buf, INSN_SIZE);
+2009-03-18 Andrew Stubbs <ams@codesourcery.com>
+
+ * gas/arm/adr-invalid.d: New file.
+ * gas/arm/adr-invalid.l: New file.
+ * gas/arm/adr-invalid.s: New file.
+
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
* gas/ppc/textalign-xcoff-001.d: Expect the section VMAs to be
--- /dev/null
+[^:]*: Assembler messages:
+[^:]*:3: Error: symbol var is in a different section
+[^:]*:4: Error: undefined symbol undefinedvar used as an immediate value
+[^:]*:5: Error: symbol var is in a different section
+[^:]*:6: Error: undefined symbol undefinedvar used as an immediate value