Exemple #1
0
void
xly_dump_file(FILE *f, int do_beams)
{
    lily_out = f;

    dumpLayout();
    dump_notes(do_beams);
    dump_score();

    dumpFinish();
}
Exemple #2
0
/*===========================================================================*
 *				write_elf_core_file			     *
 *===========================================================================*/
void write_elf_core_file(struct filp *f, int csig, char *proc_name)
{
/* First, fill in all the required headers, second, adjust the offsets,
 * third, dump everything into the core file
 */
#define MAX_REGIONS 100
#define NR_NOTE_ENTRIES 2
  Elf_Ehdr elf_header;
  Elf_Phdr phdrs[MAX_REGIONS + 1];
  Elf_Nhdr nhdrs[NR_NOTE_ENTRIES];
  int phnum;

  memset(phdrs, 0, sizeof(phdrs));

  /* Fill in the NOTE Program Header - at phdrs[0] - and
   * note entries' headers
   */
  fill_note_segment_and_entries_hdrs(phdrs, nhdrs);

  /* Get the memory segments and fill in the Program headers */
  phnum = get_memory_regions(phdrs) + 1;

  /* Fill in the ELF header */
  fill_elf_header(&elf_header, phnum);

  /* Adjust offsets in program headers - The layout in the ELF core file
   * is the following: the ELF Header, the Note Program Header,
   * the rest of Program Headers (memory segments), Note contents,
   * the program segments' contents
   */
  adjust_offsets(phdrs, phnum);

  /* Write ELF header */
  dump_elf_header(f, elf_header);

  /* Write Program headers (Including the NOTE) */
  dump_program_headers(f, phdrs, phnum);

  /* Write NOTE contents */
  dump_notes(f, nhdrs, csig, proc_name);

  /* Write segments' contents */
  dump_segments(f, phdrs, phnum);
}