(segment_info_type) [NEED_LITERAL_POOL]: Add field literal_pool_size.

This commit is contained in:
Ken Raeburn 1994-01-13 21:30:18 +00:00
parent 7f955c18aa
commit 939b21d207

View file

@ -1,18 +1,19 @@
/* subsegs.h -> subsegs.c /* subsegs.h -> subsegs.c
Copyright (C) 1987 Free Software Foundation, Inc.
Copyright (C) 1987, 1992 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler. This file is part of GAS, the GNU Assembler.
GAS is free software; you can redistribute it and/or modify GAS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GAS is distributed in the hope that it will be useful, GAS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to along with GAS; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
@ -38,50 +39,92 @@
struct frchain /* control building of a frag chain */ struct frchain /* control building of a frag chain */
{ /* FRCH = FRagment CHain control */ { /* FRCH = FRagment CHain control */
struct frag * frch_root; /* 1st struct frag in chain, or NULL */ struct frag *frch_root; /* 1st struct frag in chain, or NULL */
struct frag * frch_last; /* last struct frag in chain, or NULL */ struct frag *frch_last; /* last struct frag in chain, or NULL */
struct frchain * frch_next; /* next in chain of struct frchain-s */ struct frchain *frch_next; /* next in chain of struct frchain-s */
segT frch_seg; /* SEG_TEXT or SEG_DATA. */ segT frch_seg; /* SEG_TEXT or SEG_DATA. */
subsegT frch_subseg; /* subsegment number of this chain */ subsegT frch_subseg; /* subsegment number of this chain */
}; };
typedef struct frchain frchainS; typedef struct frchain frchainS;
extern frchainS * frchain_root; /* NULL means no frchains yet. */ /* All subsegments' chains hang off here. NULL means no frchains yet. */
/* all subsegments' chains hang off here */ extern frchainS *frchain_root;
extern frchainS * frchain_now; /* Frchain we are assembling into now That is, the current segment's
/* Frchain we are assembling into now */ frag chain, even if it contains no (complete) frags. */
/* That is, the current segment's frag */ extern frchainS *frchain_now;
/* chain, even if it contains no (complete) */
/* frags. */
typedef struct
{
frchainS *frchainP;
int hadone : 1;
/* This field is set if this is a .bss section which does not really
have any contents. Once upon a time a .bss section did not have
any frags, but that is no longer true. This field prevent the
SEC_HAS_CONTENTS flag from being set for the section even if
there are frags. */
int bss : 1;
int user_stuff;
fixS *fix_root;
fixS *fix_tail;
#if defined (MANY_SEGMENTS) && !defined (BFD_ASSEMBLER)
struct internal_scnhdr scnhdr;
#endif
symbolS *dot;
struct lineno_list *lineno_list_head;
struct lineno_list *lineno_list_tail;
#ifdef BFD_ASSEMBLER
/* Which BFD section does this gas segment correspond to? */
asection *bfd_section;
/* NULL, or pointer to the gas symbol that is the section symbol for
this section. sym->bsym and bfd_section->symbol should be the same. */
symbolS *sym;
#endif
union
{
/* Current size of section holding stabs strings. */
unsigned long stab_string_size;
/* Initial frag for ELF. */
char *p;
}
stabu;
#ifdef NEED_LITERAL_POOL
unsigned long literal_pool_size;
#endif
} segment_info_type;
#ifdef BFD_ASSEMBLER
#define seg_info(SEC) \
((segment_info_type *) bfd_get_section_userdata (stdoutput, (SEC)))
extern symbolS *section_symbol PARAMS ((segT));
#else /* ! BFD_ASSEMBLER */
#ifdef MANY_SEGMENTS #ifdef MANY_SEGMENTS
typedef struct
{ extern segment_info_type segment_info[];
frchainS *frchainP;
int hadone; #define seg_info(SEC) (&segment_info[SEC])
int user_stuff;
/* struct frag *frag_root;*/
/* struct frag *last_frag;*/
fixS *fix_root;
fixS *fix_tail;
struct internal_scnhdr scnhdr;
symbolS *dot;
struct lineno_list *lineno_list_head;
struct lineno_list *lineno_list_tail;
} segment_info_type;
segment_info_type segment_info[];
#else #else
extern frchainS * data0_frchainP;
/* Sentinel for frchain crawling. */ /* Sentinel for frchain crawling. Points to the 1st data-segment
/* Points to the 1st data-segment frchain. */ frchain. (Which is pointed to by the last text-segment frchain.) */
/* (Which is pointed to by the last text- */ extern frchainS *data0_frchainP;
/* segment frchain.) */ extern frchainS *bss0_frchainP;
#endif #endif
#endif /* ! BFD_ASSEMBLER */
/* end of subsegs.h */ /* end of subsegs.h */