Example #1
0
/*
** Utility routine: bfd_pic30_report_external_symbols
**
** - print sorted symbol tables to file *fp
**/
static void
pic30_report_external_symbols (FILE *fp) {

#define DATA 1
#define CODE 2

  pic30_init_symbol_list (&pic30_symbol_list);

  /* data memory */
  bfd_link_hash_traverse (link_info.hash,
                          pic30_build_data_symbol_list, &pic30_symbol_list);
  if (pic30_symbol_count)
    pic30_report_symbol_table (fp, pic30_symbol_list, pic30_symbol_count,
                               "Data Memory", DATA);
  /* data EEPROM */
  pic30_symbol_count = 0;
  bfd_link_hash_traverse (link_info.hash,
                          pic30_build_eedata_symbol_list, &pic30_symbol_list);
    if (pic30_symbol_count)
      pic30_report_symbol_table (fp, pic30_symbol_list, pic30_symbol_count,
                                 "Data EEPROM", CODE);
  /* program memory */
  pic30_symbol_count = 0;
  bfd_link_hash_traverse (link_info.hash,
                          pic30_build_program_symbol_list, &pic30_symbol_list);
    if (pic30_symbol_count)
      pic30_report_symbol_table (fp, pic30_symbol_list, pic30_symbol_count,
                                 "Program Memory", CODE);

  free(pic30_symbol_list);

} /* static void bfd_pic30_report_external_symbols */
Example #2
0
	/*******************************************************
		Function: cleanup_symtab_for_ipa

		In -IPA mode, we pass the last bit of info in the
		merged symbol table that is needed by ipa.so, and
		then clean up the storage allcoated.
		
	 *******************************************************/
void cleanup_symtab_for_ipa(void)
{
    /* first, synch. up the symbol attributes with IPA's WHIRL symtab */

    bfd_link_hash_traverse(link_info.hash, ipa_symbol_sync, (PTR)NULL);

#if 0
    /* TODO */
    /* collect autognum and other info and pass them to ipa */
    if (threadlocalsyms)
        mark_all_xlocal_not_gp_rel ();

    /* finally release all unnecessary storage allocated in ld. */
#endif
}  /* cleanup_symtab_for_ipa */