undefined symbols.
Fixes PR 2997.
* read.c (s_data), config/obj-coffbfd.c (obj_coff_data): If -R,
switch to text section rather than data section.
Fixes PR 2971.
+Mon Jul 19 14:30:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * expr.c (clean_up_expression): Don't cancel the subtraction of
+ undefined symbols.
+
+ * read.c (s_data), config/obj-coffbfd.c (obj_coff_data): If -R,
+ switch to text section rather than data section.
+
Mon Jul 19 12:35:39 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
* config/tc-m68k.c (m68k_ip, case AINDX): Add 6 to operand
static void
obj_coff_data ()
{
- change_to_section (".data", 5, get_absolute_expression ());
+ if (flagseen['R'])
+ change_to_section (".text", 5, get_absolute_expression () + 1000);
+ else
+ change_to_section (".data", 5, get_absolute_expression ());
}
static void
&& expressionP->X_add_symbol
&& (expressionP->X_subtract_symbol->sy_frag
== expressionP->X_add_symbol->sy_frag)
+ && SEG_NORMAL (S_GET_SEGMENT (expressionP->X_add_symbol))
&& (S_GET_VALUE (expressionP->X_subtract_symbol)
== S_GET_VALUE (expressionP->X_add_symbol))))
{
void
s_data ()
{
+ segT section;
register int temp;
temp = get_absolute_expression ();
+ if (flagseen['R'])
+ {
+ section = text_section;
+ temp += 1000;
+ }
+ else
+ section = data_section;
+
#ifdef BFD_ASSEMBLER
- subseg_set (data_section, (subsegT) temp);
+ subseg_set (section, (subsegT) temp);
#else
- subseg_new (data_section, (subsegT) temp);
+ subseg_new (section, (subsegT) temp);
#endif
#ifdef OBJ_VMS