/* subsegs.c - subsegments -
- Copyright (C) 1987, 1990, 1991 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
#else
frchainS* frchain_root,
* frchain_now, /* Commented in "subsegs.h". */
- * data0_frchainP;
+ * data0_frchainP,
+ * bss0_frchainP;
#endif
char * const /* in: segT out: char* */
#else
subseg_new (SEG_DATA, 0); /* .data 0 */
data0_frchainP = frchain_now;
+
+ subseg_new (SEG_BSS, 0);
+ bss0_frchainP = frchain_now;
+
#endif
}
seg_fix_rootP = & data_fix_root;
seg_fix_tailP = & data_fix_tail;
}
- else
+ else if (seg == SEG_TEXT)
{
- know (seg == SEG_TEXT);
seg_fix_rootP = & text_fix_root;
seg_fix_tailP = & text_fix_tail;
}
+ else {
+ know (seg == SEG_BSS);
+ seg_fix_rootP = & bss_fix_root;
+ seg_fix_tailP = & bss_fix_tail;
+ }
#endif
}
\f
void
subseg_new (seg, subseg) /* begin assembly for a new sub-segment */
-register segT seg; /* SEG_DATA or SEG_TEXT */
+register segT seg; /* SEG_DATA or SEG_TEXT */
register subsegT subseg;
{
long tmp; /* JF for obstack alignment hacking */
#ifndef MANY_SEGMENTS
- know( seg == SEG_DATA || seg == SEG_TEXT );
+ know(seg == SEG_DATA || seg == SEG_TEXT || seg == SEG_BSS);
+#endif
+#ifdef OBJ_AOUT
+/* If -R specifed, always put stuff into the data section */
+ if (flagseen['R'])
+ {
+ if (seg == SEG_DATA)
+ {
+ subseg += 1000;
+ seg = SEG_TEXT;
+ }
+ }
#endif
if (seg != now_seg || subseg != now_subseg)
{ /* we just changed sub-segments */