aboutsummaryrefslogtreecommitdiff
path: root/gas/subsegs.h
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1994-12-20 22:42:03 +0000
committerKen Raeburn <raeburn@cygnus>1994-12-20 22:42:03 +0000
commit87e48495014d9a1d075e7c99aeb9cb29daccc796 (patch)
tree12f68295b61f65ec259118b7107e7b7ed9d9e418 /gas/subsegs.h
parent0427f3ec1c0f0d356e6c1e4a91e8ff116f0c3ee8 (diff)
downloadgdb-87e48495014d9a1d075e7c99aeb9cb29daccc796.zip
gdb-87e48495014d9a1d075e7c99aeb9cb29daccc796.tar.gz
gdb-87e48495014d9a1d075e7c99aeb9cb29daccc796.tar.bz2
* frags.c (frag_init): Call obstack_begin on `frags'.
* subsegs.c (subsegs_begin): Don't do it here. * as.c (main): Call frag_init before subsegs_begin. * frags.c (frag_append_1_char): New function. * frags.h (frag_append_1_char): Declare it. (FRAG_APPEND_1_CHAR): Call it. Old definition is commented out for now. * as.h (struct frag): Added (but commented out) new fields for tracking current alignment. (frag_now_fix): Changed macro to function declaration. * frags.c (frag_now_fix): Define function here. (frag_new): Use it instead of accessing `frags' directly. * frags.h (frags): Change comment to indicate it shouldn't be accessed directly. * subsegs.h (struct frchain): New field frch_obstack, intended to eventually replace global `frags' obstack. * subsegs.c (subseg_set_rest): Use frag_now_fix instead of accessing `frags' directly. Initialize fields of new frchainS explicitly instead of with memset. * config/obj-coff.c (obj_coff_ln) [!BFD_ASSEMBLER]: Use frag_now_fix. * config/tc-mips.c (s_loc), config/obj-vms.c (vms_resolve_symbol_redef), symbols.c (colon): Likewise.
Diffstat (limited to 'gas/subsegs.h')
-rw-r--r--gas/subsegs.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/gas/subsegs.h b/gas/subsegs.h
index 0b65c0f..2d3a100 100644
--- a/gas/subsegs.h
+++ b/gas/subsegs.h
@@ -1,6 +1,6 @@
/* subsegs.h -> subsegs.c
- Copyright (C) 1987, 1992 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1992, 1993, 1994 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -44,6 +44,11 @@ struct frchain /* control building of a frag chain */
struct frchain *frch_next; /* next in chain of struct frchain-s */
segT frch_seg; /* SEG_TEXT or SEG_DATA. */
subsegT frch_subseg; /* subsegment number of this chain */
+#ifdef BFD_ASSEMBLER
+ fixS *fix_root; /* Root of fixups for this subsegment. */
+ fixS *fix_tail; /* Last fixup for this subsegment. */
+#endif
+ struct obstack frch_obstack; /* for objects in this frag chain */
};
typedef struct frchain frchainS;
@@ -69,8 +74,12 @@ typedef struct
int bss : 1;
int user_stuff;
+
+ /* Fixups for this segment. If BFD_ASSEMBLER, this is only valid
+ after the frchains are run together. */
fixS *fix_root;
fixS *fix_tail;
+
#if defined (MANY_SEGMENTS) && !defined (BFD_ASSEMBLER)
struct internal_scnhdr scnhdr;
#endif
@@ -104,8 +113,7 @@ typedef struct
#ifdef BFD_ASSEMBLER
-#define seg_info(SEC) \
- ((segment_info_type *) bfd_get_section_userdata (stdoutput, (SEC)))
+extern segment_info_type *seg_info PARAMS ((segT));
extern symbolS *section_symbol PARAMS ((segT));
#else /* ! BFD_ASSEMBLER */