flat              204 modules/module_load.c static int module_do_relocations(flat_hdr* flat, void* relocbuf, uint32_t reloc_count)
flat              207 modules/module_load.c     unsigned char* buf = (unsigned char*)flat;      // base address of module in memory
flat              247 modules/module_load.c static int module_do_imports(flat_hdr* flat, void* relocbuf, uint32_t import_count)
flat              250 modules/module_load.c     unsigned char* buf = (unsigned char*)flat;  // base address of module in memory
flat              528 modules/module_load.c     flat_hdr flat;
flat              529 modules/module_load.c     b_read(module_fd, (char*)&flat, sizeof(flat));  // TODO - compare loaded with requested size
flat              538 modules/module_load.c     if ((flat.rev == FLAT_VERSION) && (flat.magic == FLAT_MAGIC_NUMBER))
flat              541 modules/module_load.c         msg = load_module_file(module_fd, name, flat.reloc_start, flat.bss_size, &flat_buf);
flat              853 modules/module_load.c     flat_hdr flat;
flat              854 modules/module_load.c     read(fd, (char*)&flat, sizeof(flat_hdr));
flat              857 modules/module_load.c     if ((flat.rev == FLAT_VERSION) && (flat.magic == FLAT_MAGIC_NUMBER))
flat              859 modules/module_load.c         lseek(fd, flat._module_info_offset, SEEK_SET);
flat               42 tools/elf2flt/elfflt.c flat_hdr* flat;  // point to flat_buf, but casted to header
flat              271 tools/elf2flt/elfflt.c     if ( offs >=flat->entry && offs<flat->data_start )
flat              272 tools/elf2flt/elfflt.c        { sect="text"; secoffs=flat->entry;}
flat              273 tools/elf2flt/elfflt.c     else if  ( offs >=flat->data_start && offs<flat->reloc_start )
flat              274 tools/elf2flt/elfflt.c        { sect="data"; secoffs=flat->data_start;}
flat              275 tools/elf2flt/elfflt.c     else if  ( offs >=flat->reloc_start && offs<(flat->reloc_start+flat->bss_size) )
flat              276 tools/elf2flt/elfflt.c        { sect="bss"; secoffs=flat->reloc_start;}
flat              291 tools/elf2flt/elfflt.c     if  ( offs >=flat->reloc_start || offs<flat->data_start )
flat              581 tools/elf2flt/elfflt.c   flat = (flat_hdr*) flat_buf;
flat              606 tools/elf2flt/elfflt.c   flat->magic = FLAT_MAGIC_NUMBER;
flat              607 tools/elf2flt/elfflt.c   flat->rev = FLAT_VERSION;
flat              608 tools/elf2flt/elfflt.c   flat->entry = text.flat_offset;
flat              609 tools/elf2flt/elfflt.c   flat->data_start = rodata.flat_offset;
flat              611 tools/elf2flt/elfflt.c   flat->bss_size = bss.size;
flat              612 tools/elf2flt/elfflt.c   flat->reloc_start = flatmainsize;
flat              615 tools/elf2flt/elfflt.c   flat->import_start = 0;
flat              642 tools/elf2flt/elfflt.c   flat->import_start = flat->reloc_start+flat_reloc_count*sizeof(reloc_record_t);
flat              649 tools/elf2flt/elfflt.c   flat->_module_info_offset = find_symbol_inflat("_module_info", &data );
flat              650 tools/elf2flt/elfflt.c   if ( flat->_module_info_offset <=0 ) {
flat              655 tools/elf2flt/elfflt.c   ModuleInfo* _module_info = (ModuleInfo*) (flat_buf + flat->_module_info_offset);
flat              702 tools/elf2flt/elfflt.c   flat->import_size = new_import_cnt*sizeof(uint32_t);
flat              706 tools/elf2flt/elfflt.c 	printf("->entry        0x%x (size %d)\n", flat->entry, flat->data_start - flat->entry );
flat              707 tools/elf2flt/elfflt.c 	printf("->data_start   0x%x (size %d)\n", flat->data_start,  flat->reloc_start - flat->data_start );
flat              708 tools/elf2flt/elfflt.c 	printf("->bss_start    0x%x (size %d)\n", flat->reloc_start, flat->bss_size );
flat              709 tools/elf2flt/elfflt.c 	printf("->reloc_start  0x%x (size %d)\n", flat->reloc_start, flat_reloc_count*sizeof(reloc_record_t) );
flat              710 tools/elf2flt/elfflt.c 	printf("->import_start 0x%x (size %d %d)\n", flat->import_start, flat->import_size, flat_import_count*sizeof(import_record_t) );
flat              735 tools/elf2flt/elfflt.c     dump_section( "FLT_text", (unsigned char*)flat_buf+flat->entry, flat->data_start-flat->entry );
flat              736 tools/elf2flt/elfflt.c     dump_section( "FLT_data", (unsigned char*)flat_buf+flat->data_start, flat->reloc_start-flat->data_start);
flat              739 tools/elf2flt/elfflt.c     printf("\nDump relocations 0x%x (size=%d):\n",flat->reloc_start,flat_reloc_count*sizeof(reloc_record_t));
flat              742 tools/elf2flt/elfflt.c         print_offs("Offs: ",*(int*)(flat_buf+flat->reloc_start+i*sizeof(reloc_record_t)), "\n");
flat              745 tools/elf2flt/elfflt.c     printf("\nDump imports 0x%x (size=%d):\n",flat->import_start,new_import_cnt*sizeof(uint32_t));
flat              761 tools/elf2flt/elfflt.c   int filesize = flat->import_start + flat->import_size;
flat              766 tools/elf2flt/elfflt.c   i = write(output_fd, flat_buf, flat->import_start);
flat               46 tools/elf2flt/elfflt.h extern flat_hdr* flat;
flat               14 tools/elf2flt/fltdump.c flat_hdr* flat;
flat               46 tools/elf2flt/fltdump.c     if ( offs >=flat->entry && offs<flat->data_start )
flat               47 tools/elf2flt/fltdump.c        { sect="text"; secoffs=flat->entry;}
flat               48 tools/elf2flt/fltdump.c     else if  ( offs >=flat->data_start && offs<flat->reloc_start )
flat               49 tools/elf2flt/fltdump.c        { sect="data"; secoffs=flat->data_start;}
flat               50 tools/elf2flt/fltdump.c     else if  ( offs >=flat->reloc_start && offs<(flat->reloc_start+flat->bss_size) )
flat               51 tools/elf2flt/fltdump.c        { sect="bss"; secoffs=flat->reloc_start;}
flat               65 tools/elf2flt/fltdump.c     if  ( offs >=flat->reloc_start || offs<flat->data_start )
flat               95 tools/elf2flt/fltdump.c 	flat = (flat_hdr*) b_get_buf();
flat               99 tools/elf2flt/fltdump.c 	memcpy(magic,&flat->magic,4);
flat              103 tools/elf2flt/fltdump.c 	printf("->magic        %s (flat rev.%d)\n", magic, flat->rev );
flat              105 tools/elf2flt/fltdump.c 	if (flat->magic != FLAT_MAGIC_NUMBER)
flat              111 tools/elf2flt/fltdump.c 	if ( flat->rev != FLAT_VERSION )
flat              113 tools/elf2flt/fltdump.c 		printf("Bad FLAT revision! It is %d while should be %d\n", flat->rev, FLAT_VERSION);
flat              117 tools/elf2flt/fltdump.c 	flat_reloc_count = (flat->import_start-flat->reloc_start)/sizeof(uint32_t);
flat              119 tools/elf2flt/fltdump.c 	flat_import_count = (flat->import_size)/sizeof(uint32_t);
flat              122 tools/elf2flt/fltdump.c 	printf("->entry(.text) 0x%x (size %d)\n", flat->entry, flat->data_start - flat->entry );
flat              123 tools/elf2flt/fltdump.c 	printf("->data_start   0x%x (size %d)\n", flat->data_start,  flat->reloc_start - flat->data_start );
flat              124 tools/elf2flt/fltdump.c 	printf("->bss_start    0x%x (size %d)\n", flat->reloc_start, flat->bss_size );
flat              125 tools/elf2flt/fltdump.c 	printf("->reloc_start  0x%x (size %d)\n", flat->reloc_start, flat->import_start - flat->reloc_start );
flat              126 tools/elf2flt/fltdump.c 	printf("->import_start 0x%x (size %d)\n", flat->import_start, flat->import_size );
flat              129 tools/elf2flt/fltdump.c 	if ( flat->rev == FLAT_VERSION )
flat              131 tools/elf2flt/fltdump.c 		ModuleInfo* _module_info = (ModuleInfo*)(flat_buf + flat->_module_info_offset);
flat              168 tools/elf2flt/fltdump.c     dump_section( "FLT_text", flat_buf+flat->entry, flat->data_start-flat->entry );
flat              169 tools/elf2flt/fltdump.c     dump_section( "FLT_data", flat_buf+flat->data_start, flat->reloc_start-flat->data_start);
flat              173 tools/elf2flt/fltdump.c     printf("\nDump relocations 0x%x (size=%d):\n",flat->reloc_start,flat_reloc_count*sizeof(uint32_t));
flat              175 tools/elf2flt/fltdump.c         print_offs("Offs: ",*(int*)(flat_buf+flat->reloc_start+i*sizeof(uint32_t)),"\n");
flat              177 tools/elf2flt/fltdump.c     printf("\nDump imports 0x%x (size=%d):\n",flat->import_start,flat_import_count*sizeof(uint32_t));
flat              178 tools/elf2flt/fltdump.c     uint32_t *new_import_buf = (uint32_t*)(flat_buf+flat->import_start);