Back to index

cell-binutils  2.17cvs20070401
Classes | Defines | Typedefs | Functions | Variables
subsegs.h File Reference
#include "obstack.h"

Go to the source code of this file.


struct  frchain
struct  segment_info_struct
union  segment_info_struct.stabu


#define seg_info(sec)   ((segment_info_type *) bfd_get_section_userdata (stdoutput, sec))


typedef struct frchain
typedef struct segment_info_struct segment_info_type


symbolS * section_symbol (segT)
void subsegs_print_statistics (FILE *)


frchainS * frchain_now

Class Documentation

struct frchain

Definition at line 45 of file subsegs.h.

Collaboration diagram for frchain:
Class Members
fixS * fix_root
fixS * fix_tail
struct frch_cfi_data * frch_cfi_data
fragS * frch_frag_now
struct frag * frch_last
struct frchain * frch_next
struct frag * frch_root
subsegT frch_subseg
struct segment_info_struct

Definition at line 64 of file subsegs.h.

Collaboration diagram for segment_info_struct:
Class Members
asection * bfd_section
unsigned int bss: 1
symbolS * dot
fixS * fix_root
fixS * fix_tail
frchainS * frchainP
unsigned int hadone: 1
struct lineno_list * lineno_list_head
struct lineno_list * lineno_list_tail
union segment_info_struct stabu
symbolS * sym
int user_stuff
union segment_info_struct.stabu

Definition at line 94 of file subsegs.h.

Class Members
char * p
unsigned long stab_string_size

Define Documentation

#define seg_info (   sec)    ((segment_info_type *) bfd_get_section_userdata (stdoutput, sec))

Definition at line 112 of file subsegs.h.

Typedef Documentation

typedef struct frchain

Definition at line 58 of file subsegs.h.

Function Documentation

symbolS* section_symbol ( segT  )

Definition at line 212 of file subsegs.c.

  segment_info_type *seginfo = seg_info (sec);
  symbolS *s;

  if (seginfo == 0)
    abort ();
  if (seginfo->sym)
    return seginfo->sym;


  if (! EMIT_SECTION_SYMBOLS || symbol_table_frozen)
      /* Here we know it won't be going into the symbol table.  */
      s = symbol_create (sec->symbol->name, sec, 0, &zero_address_frag);
      segT seg;
      s = symbol_find (sec->symbol->name);
      /* We have to make sure it is the right symbol when we
        have multiple sections with the same section name.  */
      if (s == NULL
         || ((seg = S_GET_SEGMENT (s)) != sec
             && seg != undefined_section))
       s = symbol_new (sec->symbol->name, sec, 0, &zero_address_frag);
      else if (seg == undefined_section)
         S_SET_SEGMENT (s, sec);
         symbol_set_frag (s, &zero_address_frag);


  /* Use the BFD section symbol, if possible.  */
  if (obj_sec_sym_ok_for_reloc (sec))
    symbol_set_bfdsym (s, sec->symbol);
    symbol_get_bfdsym (s)->flags |= BSF_SECTION_SYM;

  seginfo->sym = s;
  return s;

Here is the call graph for this function:

Here is the caller graph for this function:

void subsegs_print_statistics ( FILE *  )

Definition at line 297 of file subsegs.c.

  frchainS *frchp;
  asection *s;

  fprintf (file, "frag chains:\n");
  for (s = stdoutput->sections; s; s = s->next)
      segment_info_type *seginfo;

      /* Skip gas-internal sections.  */
      if (segment_name (s)[0] == '*')

      seginfo = seg_info (s);
      if (!seginfo)

      for (frchp = seginfo->frchainP; frchp; frchp = frchp->frch_next)
         int count = 0;
         fragS *fragp;

         for (fragp = frchp->frch_root; fragp; fragp = fragp->fr_next)

         fprintf (file, "\n");
         fprintf (file, "\t%p %-10s\t%10d frags\n", (void *) frchp,
                 segment_name (s), count);

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

frchainS* frchain_now

Definition at line 30 of file subsegs.c.