aboutsummaryrefslogtreecommitdiff
path: root/gas/subsegs.c
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1992-06-04 19:21:58 +0000
committerSteve Chamberlain <sac@cygnus>1992-06-04 19:21:58 +0000
commitf8701a3ff892202ea34e9a721c66f8dab62f5c7c (patch)
treed92b8743afc7dc3186763528fe62e99dd43bd8ca /gas/subsegs.c
parentf4a0f42d8ae83b302641b74c3dea1912964e0145 (diff)
downloadgdb-f8701a3ff892202ea34e9a721c66f8dab62f5c7c.zip
gdb-f8701a3ff892202ea34e9a721c66f8dab62f5c7c.tar.gz
gdb-f8701a3ff892202ea34e9a721c66f8dab62f5c7c.tar.bz2
Thu Jun 4 11:59:13 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* expr.c(expr): allow SEG_REGISTER in expressions. * read.c(pseudo_set): register expressions can be the source of a set. * subsegs.c (subseg_new): Now -R forces all changes to SEG_DATA to goto SEG_TEXT (if a.out) * write.c (write_object_file): If a.out don't use the old way for -R. * config/obj-a.out (s_sect): complain if the user tries to use a subsegment with a value which might interfere with out -R hackery. * config/tc-m68k.c (m68k_reg_parse): lookup names in symbol table rather than use ugly if tree. (init_regtable): insert register names into symbol table.
Diffstat (limited to 'gas/subsegs.c')
-rw-r--r--gas/subsegs.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/gas/subsegs.c b/gas/subsegs.c
index 9768e7f..2e4c10b 100644
--- a/gas/subsegs.c
+++ b/gas/subsegs.c
@@ -35,8 +35,7 @@ frchainS* frchain_root,
#else
frchainS* frchain_root,
* frchain_now, /* Commented in "subsegs.h". */
- * data0_frchainP,
- * bss0_frchainP;
+ * data0_frchainP;
#endif
char * const /* in: segT out: char* */
@@ -109,8 +108,6 @@ void
#else
subseg_new (SEG_DATA, 0); /* .data 0 */
data0_frchainP = frchain_now;
- subseg_new (SEG_BSS, 0);
- bss0_frchainP = frchain_now;
#endif
}
@@ -136,12 +133,7 @@ register int subseg;
seg_fix_rootP = & segment_info[seg].fix_root;
seg_fix_tailP = & segment_info[seg].fix_tail;
#else
- if (seg == SEG_BSS)
- {
- seg_fix_rootP = & bss_fix_root;
- seg_fix_tailP = & bss_fix_tail;
- }
- else if (seg == SEG_DATA)
+ if (seg == SEG_DATA)
{
seg_fix_rootP = & data_fix_root;
seg_fix_tailP = & data_fix_tail;
@@ -173,13 +165,25 @@ register int subseg;
void
subseg_new (seg, subseg) /* begin assembly for a new sub-segment */
-register segT seg; /* SEG_DATA or SEG_TEXT or SEG_BSS */
+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 || seg == SEG_BSS);
+ know(seg == SEG_DATA || seg == SEG_TEXT);
+#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 */
register frchainS * frcP; /* crawl frchain chain */