Packing mods problem on Loonson 3A/B
Hello,
I'm working on 2.00src for Loongson 3A/B. So far, I can compiled them and run into "grub rescue" screen(by UEFI Bios LoadImage kernel.img), see attach.
The problem is I can't pack mods with grub-mkimage command, it doesn't work neither loongson(2F?) nor EFI mode. For 1.99rc1 we used to pack mods into mips/efi/init.c and compile to a stand along kernel.img, it's not a smart idea at all. Now we are on the whole new source and 4.8.1 mips64el gcc, in my point of view we must build it in correct way like others.
I need your suggestions about how to packing kernel.img with other mods, seems "objcopy" didn't work for me. Last week, I was tired to build my own mkimage tools, this website may help: https://dmz-portal.mips.com/wiki/MIPS_relocation_types , really hard and I don't know what if it's a wrong way or not.
Awaiting for your reply, thanks.
Regards,
oOkami
Aug.12 2013
Some console information:
oOkami:Debug oOkami$ file grub-core/kernel.img
grub-core/kernel.img: ELF 32-bit LSB executable, MIPS, N32 MIPS-III version 1 (SYSV), statically linked, with unknown capability 0xf41 = 0x756e6700, with unknown capability 0x70100 = 0x1040000, stripped
oOkami:Debug oOkami$ file grub-core/part_msdos.mod
grub-core/part_msdos.mod: ELF 32-bit LSB relocatable, MIPS, N32 MIPS-III version 1 (SYSV), with unknown capability 0xf41 = 0x756e6700, with unknown capability 0x70100 = 0x1040000, not stripped
argc=2
argv[0]=./okm-mkimage
argv[1]=grub-core/kernel.img
Reading grub-core/kernel.img File size 84680 bytes (0x14ac8)
ehdr 0x00000000
phdr 0x00000034
shdr 0x000148e8
********** ELF HEADER START **********ehdr->e_ident 16 bytes 0x00-0x0F
7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
EI_MAG[0x7f ELF] Passed!
EI_CLASS[0x01] ELFCLASS32 32-bit objects
EI_DATA[0x01] ELFDATA2LSB 2's complement, little endian EI_VERSION[0x01] This must be EV_CURRENT
EI_OSABI[0x00]
EFI flag at 0x0C[0x00] for ZDBIOS This must be 0xA(EFI) or 0x0(ELF)
ehdr->e_type 2 bytes 0x10-0x11 [0x0002] ET_EXEC Executable fileehdr->e_machine 2 bytes 0x12-0x13 [0x0008] Check elfdef.hehdr->e_version 4 bytes 0x14-0x17 [0x00000001] Current versionehdr->e_entry 4 bytes 0x18-0x1b [0x88800000] Entry pointehdr->e_phoff 4 bytes 0x1c-0x1f [0x00000034] Program header table's file offsetehdr->e_shoff 4 bytes 0x20-0x23 [0x000148e8] Section header table's file offsetehdr->e_flags 4 bytes 0x24-0x27 [0x20000027] Machine Flagsehdr->e_ehsize 2 bytes 0x28-0x29 [0x0034] ELF header's sizeehdr->e_phentsize 2 bytes 0x2a-0x2b [0x0020] size of one entry in Program header tableehdr->e_phnum 2 2 bytes 0x2c-0x2d [0x0003] number of entries in Program header tableehdr->e_shentsize 2 bytes 0x2e-0x2f [0x0028] a section header's sizeehdr->e_shnum 2 2 bytes 0x30-0x31 [0x000c] number of entries in section header tableehdr->e_shstrndx 2 bytes 0x32-0x33 [0x000b] see PDF for more information
********** PROGRAM HEADER START **********
phdr[0].p_type 0x0034 [0x70000000] PT_LOPROC Start of processor-specific
phdr[0].p_offset 0x0038 [0x00000000] Offset from beginning of the file
phdr[0].p_vaddr 0x003c [0x00000000] Virtual Address
phdr[0].p_paddr 0x0040 [0x00000000] Physical Address
phdr[0].p_filesz 0x0044 [0x00000000] Number of bytes in the file of the segment
phdr[0].p_memsz 0x0048 [0x00000000] Number of bytes in the memory of the segment
phdr[0].p_flags 0x004c [0x00000004] [Readable]
phdr[0].p_align 0x0050 [0x00000004] 0 and 1 means no alignment
phdr[1].p_type 0x0054 [0x00000001] PT_LOAD Loadable program segment
phdr[1].p_offset 0x0058 [0x00000094] Offset from beginning of the file
phdr[1].p_vaddr 0x005c [0x00000000] Virtual Address
phdr[1].p_paddr 0x0060 [0x00000000] Physical Address
phdr[1].p_filesz 0x0064 [0x00000000] Number of bytes in the file of the segment
phdr[1].p_memsz 0x0068 [0x00000000] Number of bytes in the memory of the segment
phdr[1].p_flags 0x006c [0x00000004] [Readable]
phdr[1].p_align 0x0070 [0x00000004] 0 and 1 means no alignment
phdr[2].p_type 0x0074 [0x00000001] PT_LOAD Loadable program segment
phdr[2].p_offset 0x0078 [0x000000a0] Offset from beginning of the file
phdr[2].p_vaddr 0x007c [0x88800000] Virtual Address
phdr[2].p_paddr 0x0080 [0x88800000] Physical Address
phdr[2].p_filesz 0x0084 [0x00012834] Number of bytes in the file of the segment
phdr[2].p_memsz 0x0088 [0x0001a020] Number of bytes in the memory of the segment
phdr[2].p_flags 0x008c [0x00000007] [Executable] [Writable] [Readable]
phdr[2].p_align 0x0090 [0x00000010] 0 and 1 means no alignment
Section to Segment mapping:
Segment Sections...
00
01
02 [.text] [.rodata] [.data.rel.ro] [.data] [.module_license] [.got] [.sbss] [.bss]
********** SECTIONS START **********
shdr[00].sh_name 0x000148e8 [0x00000000] [NULL]
shdr[00].sh_type 0x000148ec [0x00000000] SHT_NULL Section header table entry unused
shdr[00].sh_flags 0x000148f0 [0x00000000]
shdr[00].sh_addr 0x000148f4 [0x00000000] the section's reside address(if not 0)
shdr[00].sh_offset 0x000148f8 [0x00000000] the section's byte offset
shdr[00].sh_size 0x000148fc [0x00000000] section size
shdr[00].sh_link 0x00014900 [0x00000000] section header table index link
shdr[00].sh_info 0x00014904 [0x00000000] extra information See PDF for more
shdr[00].sh_addralign 0x00014908 [0x00000000] alignment 0 and 1 for none
shdr[00].sh_entsize 0x0001490c [0x00000000] fixed-size entries 0 for none fixed
shdr[01].sh_name 0x00014910 [0x0000000b] [.text]
shdr[01].sh_type 0x00014914 [0x00000001] SHT_PROGBITS Program data
shdr[01].sh_flags 0x00014918 [0x00000007] [WRITE] [ALLOC] [EXECINSTR]
shdr[01].sh_addr 0x0001491c [0x88800000] the section's reside address(if not 0)
shdr[01].sh_offset 0x00014920 [0x000000a0] the section's byte offset
shdr[01].sh_size 0x00014924 [0x0000f080] section size
shdr[01].sh_link 0x00014928 [0x00000000] section header table index link
shdr[01].sh_info 0x0001492c [0x00000000] extra information See PDF for more
shdr[01].sh_addralign 0x00014930 [0x00000010] alignment 0 and 1 for none
shdr[01].sh_entsize 0x00014934 [0x00000000] fixed-size entries 0 for none fixed
shdr[02].sh_name 0x00014938 [0x00000011] [.rodata]
shdr[02].sh_type 0x0001493c [0x00000001] SHT_PROGBITS Program data
shdr[02].sh_flags 0x00014940 [0x00000002] [ALLOC]
shdr[02].sh_addr 0x00014944 [0x8880f080] the section's reside address(if not 0)
shdr[02].sh_offset 0x00014948 [0x0000f120] the section's byte offset
shdr[02].sh_size 0x0001494c [0x000029d0] section size
shdr[02].sh_link 0x00014950 [0x00000000] section header table index link
shdr[02].sh_info 0x00014954 [0x00000000] extra information See PDF for more
shdr[02].sh_addralign 0x00014958 [0x00000010] alignment 0 and 1 for none
shdr[02].sh_entsize 0x0001495c [0x00000000] fixed-size entries 0 for none fixed
shdr[03].sh_name 0x00014960 [0x00000019] [.data.rel.ro]
shdr[03].sh_type 0x00014964 [0x00000001] SHT_PROGBITS Program data
shdr[03].sh_flags 0x00014968 [0x00000003] [WRITE] [ALLOC]
shdr[03].sh_addr 0x0001496c [0x88811a50] the section's reside address(if not 0)
shdr[03].sh_offset 0x00014970 [0x00011af0] the section's byte offset
shdr[03].sh_size 0x00014974 [0x000000c0] section size
shdr[03].sh_link 0x00014978 [0x00000000] section header table index link
shdr[03].sh_info 0x0001497c [0x00000000] extra information See PDF for more
shdr[03].sh_addralign 0x00014980 [0x00000008] alignment 0 and 1 for none
shdr[03].sh_entsize 0x00014984 [0x00000000] fixed-size entries 0 for none fixed
shdr[04].sh_name 0x00014988 [0x00000026] [.data]
shdr[04].sh_type 0x0001498c [0x00000001] SHT_PROGBITS Program data
shdr[04].sh_flags 0x00014990 [0x00000003] [WRITE] [ALLOC]
shdr[04].sh_addr 0x00014994 [0x88811b10] the section's reside address(if not 0)
shdr[04].sh_offset 0x00014998 [0x00011bb0] the section's byte offset
shdr[04].sh_size 0x0001499c [0x00000ac0] section size
shdr[04].sh_link 0x000149a0 [0x00000000] section header table index link
shdr[04].sh_info 0x000149a4 [0x00000000] extra information See PDF for more
shdr[04].sh_addralign 0x000149a8 [0x00000010] alignment 0 and 1 for none
shdr[04].sh_entsize 0x000149ac [0x00000000] fixed-size entries 0 for none fixed
shdr[05].sh_name 0x000149b0 [0x0000002c] [.module_license]
shdr[05].sh_type 0x000149b4 [0x00000001] SHT_PROGBITS Program data
shdr[05].sh_flags 0x000149b8 [0x00000003] [WRITE] [ALLOC]
shdr[05].sh_addr 0x000149bc [0x888125d0] the section's reside address(if not 0)
shdr[05].sh_offset 0x000149c0 [0x00012670] the section's byte offset
shdr[05].sh_size 0x000149c4 [0x00000030] section size
shdr[05].sh_link 0x000149c8 [0x00000000] section header table index link
shdr[05].sh_info 0x000149cc [0x00000000] extra information See PDF for more
shdr[05].sh_addralign 0x000149d0 [0x00000008] alignment 0 and 1 for none
shdr[05].sh_entsize 0x000149d4 [0x00000000] fixed-size entries 0 for none fixed
shdr[06].sh_name 0x000149d8 [0x0000003c] [.got]
shdr[06].sh_type 0x000149dc [0x00000001] SHT_PROGBITS Program data
shdr[06].sh_flags 0x000149e0 [0x10000003] [WRITE] [ALLOC]
shdr[06].sh_addr 0x000149e4 [0x88812600] the section's reside address(if not 0)
shdr[06].sh_offset 0x000149e8 [0x000126a0] the section's byte offset
shdr[06].sh_size 0x000149ec [0x00000234] section size
shdr[06].sh_link 0x000149f0 [0x00000000] section header table index link
shdr[06].sh_info 0x000149f4 [0x00000000] extra information See PDF for more
shdr[06].sh_addralign 0x000149f8 [0x00000010] alignment 0 and 1 for none
shdr[06].sh_entsize 0x000149fc [0x00000004] fixed-size entries 0 for none fixed
shdr[07].sh_name 0x00014a00 [0x00000041] [.sbss]
shdr[07].sh_type 0x00014a04 [0x00000008] SHT_NOBITS Program space with no data (bss)
shdr[07].sh_flags 0x00014a08 [0x10000003] [WRITE] [ALLOC]
shdr[07].sh_addr 0x00014a0c [0x88812834] the section's reside address(if not 0)
shdr[07].sh_offset 0x00014a10 [0x000128d4] the section's byte offset
shdr[07].sh_size 0x00014a14 [0x00000044] section size
shdr[07].sh_link 0x00014a18 [0x00000000] section header table index link
shdr[07].sh_info 0x00014a1c [0x00000000] extra information See PDF for more
shdr[07].sh_addralign 0x00014a20 [0x00000004] alignment 0 and 1 for none
shdr[07].sh_entsize 0x00014a24 [0x00000000] fixed-size entries 0 for none fixed
shdr[08].sh_name 0x00014a28 [0x00000047] [.bss]
shdr[08].sh_type 0x00014a2c [0x00000008] SHT_NOBITS Program space with no data (bss)
shdr[08].sh_flags 0x00014a30 [0x00000003] [WRITE] [ALLOC]
shdr[08].sh_addr 0x00014a34 [0x88812880] the section's reside address(if not 0)
shdr[08].sh_offset 0x00014a38 [0x000128d4] the section's byte offset
shdr[08].sh_size 0x00014a3c [0x000077a0] section size
shdr[08].sh_link 0x00014a40 [0x00000000] section header table index link
shdr[08].sh_info 0x00014a44 [0x00000000] extra information See PDF for more
shdr[08].sh_addralign 0x00014a48 [0x00000010] alignment 0 and 1 for none
shdr[08].sh_entsize 0x00014a4c [0x00000000] fixed-size entries 0 for none fixed
shdr[09].sh_name 0x00014a50 [0x0000004c] [.pdr]
shdr[09].sh_type 0x00014a54 [0x00000001] SHT_PROGBITS Program data
shdr[09].sh_flags 0x00014a58 [0x00000000]
shdr[09].sh_addr 0x00014a5c [0x00000000] the section's reside address(if not 0)
shdr[09].sh_offset 0x00014a60 [0x000128d4] the section's byte offset
shdr[09].sh_size 0x00014a64 [0x00001fa0] section size
shdr[09].sh_link 0x00014a68 [0x00000000] section header table index link
shdr[09].sh_info 0x00014a6c [0x00000000] extra information See PDF for more
shdr[09].sh_addralign 0x00014a70 [0x00000004] alignment 0 and 1 for none
shdr[09].sh_entsize 0x00014a74 [0x00000000] fixed-size entries 0 for none fixed
shdr[10].sh_name 0x00014a78 [0x00000051] [.gnu.attributes]
shdr[10].sh_type 0x00014a7c [0x6ffffff5] Unknow value.
shdr[10].sh_flags 0x00014a80 [0x00000000]
shdr[10].sh_addr 0x00014a84 [0x00000000] the section's reside address(if not 0)
shdr[10].sh_offset 0x00014a88 [0x00014874] the section's byte offset
shdr[10].sh_size 0x00014a8c [0x00000010] section size
shdr[10].sh_link 0x00014a90 [0x00000000] section header table index link
shdr[10].sh_info 0x00014a94 [0x00000000] extra information See PDF for more
shdr[10].sh_addralign 0x00014a98 [0x00000001] alignment 0 and 1 for none
shdr[10].sh_entsize 0x00014a9c [0x00000000] fixed-size entries 0 for none fixed
shdr[11].sh_name 0x00014aa0 [0x00000001] [.shstrtab]
shdr[11].sh_type 0x00014aa4 [0x00000003] SHT_STRTAB String table
shdr[11].sh_flags 0x00014aa8 [0x00000000]
shdr[11].sh_addr 0x00014aac [0x00000000] the section's reside address(if not 0)
shdr[11].sh_offset 0x00014ab0 [0x00014884] the section's byte offset
shdr[11].sh_size 0x00014ab4 [0x00000061] section size
shdr[11].sh_link 0x00014ab8 [0x00000000] section header table index link
shdr[11].sh_info 0x00014abc [0x00000000] extra information See PDF for more
shdr[11].sh_addralign 0x00014ac0 [0x00000001] alignment 0 and 1 for none
shdr[11].sh_entsize 0x00014ac4 [0x00000000] fixed-size entries 0 for none fixed
********** Symbol Table START **********
There are no Symbol Table in this file.
********** Relocation Section START ********** There are no Symbol Table in this file.
argc=2
argv[0]=./okm-mkimage
argv[1]=grub-core/part_msdos.mod
Reading grub-core/part_msdos.mod File size 3464 bytes (0xd88)
ehdr 0x00000000
phdr 0x00000034
shdr 0x000005d8
********** ELF HEADER START **********ehdr->e_ident 16 bytes 0x00-0x0F
7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
EI_MAG[0x7f ELF] Passed!
EI_CLASS[0x01] ELFCLASS32 32-bit objects
EI_DATA[0x01] ELFDATA2LSB 2's complement, little endian EI_VERSION[0x01] This must be EV_CURRENT
EI_OSABI[0x00]
EFI flag at 0x0C[0x00] for ZDBIOS This must be 0xA(EFI) or 0x0(ELF)
ehdr->e_type 2 bytes 0x10-0x11 [0x0001] ET_REL Relocatable fileehdr->e_machine 2 bytes 0x12-0x13 [0x0008] Check elfdef.hehdr->e_version 4 bytes 0x14-0x17 [0x00000001] Current versionehdr->e_entry 4 bytes 0x18-0x1b [0x00000000] Entry pointehdr->e_phoff 4 bytes 0x1c-0x1f [0x00000000] Program header table's file offsetehdr->e_shoff 4 bytes 0x20-0x23 [0x000005d8] Section header table's file offsetehdr->e_flags 4 bytes 0x24-0x27 [0x20000027] Machine Flagsehdr->e_ehsize 2 bytes 0x28-0x29 [0x0034] ELF header's sizeehdr->e_phentsize 2 bytes 0x2a-0x2b [0x0000] size of one entry in Program header tableehdr->e_phnum 2 2 bytes 0x2c-0x2d [0x0000] number of entries in Program header tableehdr->e_shentsize 2 bytes 0x2e-0x2f [0x0028] a section header's sizeehdr->e_shnum 2 2 bytes 0x30-0x31 [0x0012] number of entries in section header tableehdr->e_shstrndx 2 bytes 0x32-0x33 [0x000f] see PDF for more information
********** PROGRAM HEADER START **********
Program header are not found in this file.
Section to Segment mapping:
Segment Sections...
********** SECTIONS START **********
shdr[00].sh_name 0x000005d8 [0x00000000] [NULL]
shdr[00].sh_type 0x000005dc [0x00000000] SHT_NULL Section header table entry unused
shdr[00].sh_flags 0x000005e0 [0x00000000]
shdr[00].sh_addr 0x000005e4 [0x00000000] the section's reside address(if not 0)
shdr[00].sh_offset 0x000005e8 [0x00000000] the section's byte offset
shdr[00].sh_size 0x000005ec [0x00000000] section size
shdr[00].sh_link 0x000005f0 [0x00000000] section header table index link
shdr[00].sh_info 0x000005f4 [0x00000000] extra information See PDF for more
shdr[00].sh_addralign 0x000005f8 [0x00000000] alignment 0 and 1 for none
shdr[00].sh_entsize 0x000005fc [0x00000000] fixed-size entries 0 for none fixed
shdr[01].sh_name 0x00000600 [0x0000001b] [.reginfo]
shdr[01].sh_type 0x00000604 [0x70000006] Unknow value.
shdr[01].sh_flags 0x00000608 [0x00000002] [ALLOC]
shdr[01].sh_addr 0x0000060c [0x00000000] the section's reside address(if not 0)
shdr[01].sh_offset 0x00000610 [0x00000038] the section's byte offset
shdr[01].sh_size 0x00000614 [0x00000018] section size
shdr[01].sh_link 0x00000618 [0x00000000] section header table index link
shdr[01].sh_info 0x0000061c [0x00000000] extra information See PDF for more
shdr[01].sh_addralign 0x00000620 [0x00000008] alignment 0 and 1 for none
shdr[01].sh_entsize 0x00000624 [0x00000018] fixed-size entries 0 for none fixed
shdr[02].sh_name 0x00000628 [0x00000029] [.text]
shdr[02].sh_type 0x0000062c [0x00000001] SHT_PROGBITS Program data
shdr[02].sh_flags 0x00000630 [0x00000006] [ALLOC] [EXECINSTR]
shdr[02].sh_addr 0x00000634 [0x00000000] the section's reside address(if not 0)
shdr[02].sh_offset 0x00000638 [0x00000050] the section's byte offset
shdr[02].sh_size 0x0000063c [0x00000390] section size
shdr[02].sh_link 0x00000640 [0x00000000] section header table index link
shdr[02].sh_info 0x00000644 [0x00000000] extra information See PDF for more
shdr[02].sh_addralign 0x00000648 [0x00000010] alignment 0 and 1 for none
shdr[02].sh_entsize 0x0000064c [0x00000000] fixed-size entries 0 for none fixed
shdr[03].sh_name 0x00000650 [0x00000024] [.rela.text]
shdr[03].sh_type 0x00000654 [0x00000004] SHT_RELA Relocation entries with addends
shdr[03].sh_flags 0x00000658 [0x00000000]
shdr[03].sh_addr 0x0000065c [0x00000000] the section's reside address(if not 0)
shdr[03].sh_offset 0x00000660 [0x00000ad0] the section's byte offset
shdr[03].sh_size 0x00000664 [0x0000027c] section size
shdr[03].sh_link 0x00000668 [0x00000010] section header table index link
shdr[03].sh_info 0x0000066c [0x00000002] extra information See PDF for more
shdr[03].sh_addralign 0x00000670 [0x00000004] alignment 0 and 1 for none
shdr[03].sh_entsize 0x00000674 [0x0000000c] fixed-size entries 0 for none fixed
shdr[04].sh_name 0x00000678 [0x0000002f] [.rodata.str1.8]
shdr[04].sh_type 0x0000067c [0x00000001] SHT_PROGBITS Program data
shdr[04].sh_flags 0x00000680 [0x00000032] [ALLOC] [MERGE] [STRINGS]
shdr[04].sh_addr 0x00000684 [0x00000000] the section's reside address(if not 0)
shdr[04].sh_offset 0x00000688 [0x000003e0] the section's byte offset
shdr[04].sh_size 0x0000068c [0x000000c0] section size
shdr[04].sh_link 0x00000690 [0x00000000] section header table index link
shdr[04].sh_info 0x00000694 [0x00000000] extra information See PDF for more
shdr[04].sh_addralign 0x00000698 [0x00000008] alignment 0 and 1 for none
shdr[04].sh_entsize 0x0000069c [0x00000001] fixed-size entries 0 for none fixed
shdr[05].sh_name 0x000006a0 [0x0000003e] [.data]
shdr[05].sh_type 0x000006a4 [0x00000001] SHT_PROGBITS Program data
shdr[05].sh_flags 0x000006a8 [0x00000003] [WRITE] [ALLOC]
shdr[05].sh_addr 0x000006ac [0x00000000] the section's reside address(if not 0)
shdr[05].sh_offset 0x000006b0 [0x000004a0] the section's byte offset
shdr[05].sh_size 0x000006b4 [0x00000000] section size
shdr[05].sh_link 0x000006b8 [0x00000000] section header table index link
shdr[05].sh_info 0x000006bc [0x00000000] extra information See PDF for more
shdr[05].sh_addralign 0x000006c0 [0x00000010] alignment 0 and 1 for none
shdr[05].sh_entsize 0x000006c4 [0x00000000] fixed-size entries 0 for none fixed
shdr[06].sh_name 0x000006c8 [0x00000049] [.data.rel]
shdr[06].sh_type 0x000006cc [0x00000001] SHT_PROGBITS Program data
shdr[06].sh_flags 0x000006d0 [0x00000003] [WRITE] [ALLOC]
shdr[06].sh_addr 0x000006d4 [0x00000000] the section's reside address(if not 0)
shdr[06].sh_offset 0x000006d8 [0x000004a0] the section's byte offset
shdr[06].sh_size 0x000006dc [0x00000010] section size
shdr[06].sh_link 0x000006e0 [0x00000000] section header table index link
shdr[06].sh_info 0x000006e4 [0x00000000] extra information See PDF for more
shdr[06].sh_addralign 0x000006e8 [0x00000008] alignment 0 and 1 for none
shdr[06].sh_entsize 0x000006ec [0x00000000] fixed-size entries 0 for none fixed
shdr[07].sh_name 0x000006f0 [0x00000044] [.rela.data.rel]
shdr[07].sh_type 0x000006f4 [0x00000004] SHT_RELA Relocation entries with addends
shdr[07].sh_flags 0x000006f8 [0x00000000]
shdr[07].sh_addr 0x000006fc [0x00000000] the section's reside address(if not 0)
shdr[07].sh_offset 0x00000700 [0x00000d4c] the section's byte offset
shdr[07].sh_size 0x00000704 [0x00000018] section size
shdr[07].sh_link 0x00000708 [0x00000010] section header table index link
shdr[07].sh_info 0x0000070c [0x00000006] extra information See PDF for more
shdr[07].sh_addralign 0x00000710 [0x00000004] alignment 0 and 1 for none
shdr[07].sh_entsize 0x00000714 [0x0000000c] fixed-size entries 0 for none fixed
shdr[08].sh_name 0x00000718 [0x00000053] [.module_license]
shdr[08].sh_type 0x0000071c [0x00000001] SHT_PROGBITS Program data
shdr[08].sh_flags 0x00000720 [0x00000003] [WRITE] [ALLOC]
shdr[08].sh_addr 0x00000724 [0x00000000] the section's reside address(if not 0)
shdr[08].sh_offset 0x00000728 [0x000004b0] the section's byte offset
shdr[08].sh_size 0x0000072c [0x00000010] section size
shdr[08].sh_link 0x00000730 [0x00000000] section header table index link
shdr[08].sh_info 0x00000734 [0x00000000] extra information See PDF for more
shdr[08].sh_addralign 0x00000738 [0x00000008] alignment 0 and 1 for none
shdr[08].sh_entsize 0x0000073c [0x00000000] fixed-size entries 0 for none fixed
shdr[09].sh_name 0x00000740 [0x00000063] [.bss]
shdr[09].sh_type 0x00000744 [0x00000008] SHT_NOBITS Program space with no data (bss)
shdr[09].sh_flags 0x00000748 [0x00000003] [WRITE] [ALLOC]
shdr[09].sh_addr 0x0000074c [0x00000000] the section's reside address(if not 0)
shdr[09].sh_offset 0x00000750 [0x000004c0] the section's byte offset
shdr[09].sh_size 0x00000754 [0x00000000] section size
shdr[09].sh_link 0x00000758 [0x00000000] section header table index link
shdr[09].sh_info 0x0000075c [0x00000000] extra information See PDF for more
shdr[09].sh_addralign 0x00000760 [0x00000010] alignment 0 and 1 for none
shdr[09].sh_entsize 0x00000764 [0x00000000] fixed-size entries 0 for none fixed
shdr[10].sh_name 0x00000768 [0x0000006d] [.pdr]
shdr[10].sh_type 0x0000076c [0x00000001] SHT_PROGBITS Program data
shdr[10].sh_flags 0x00000770 [0x00000000]
shdr[10].sh_addr 0x00000774 [0x00000000] the section's reside address(if not 0)
shdr[10].sh_offset 0x00000778 [0x000004c0] the section's byte offset
shdr[10].sh_size 0x0000077c [0x00000060] section size
shdr[10].sh_link 0x00000780 [0x00000000] section header table index link
shdr[10].sh_info 0x00000784 [0x00000000] extra information See PDF for more
shdr[10].sh_addralign 0x00000788 [0x00000004] alignment 0 and 1 for none
shdr[10].sh_entsize 0x0000078c [0x00000000] fixed-size entries 0 for none fixed
shdr[11].sh_name 0x00000790 [0x00000068] [.rela.pdr]
shdr[11].sh_type 0x00000794 [0x00000004] SHT_RELA Relocation entries with addends
shdr[11].sh_flags 0x00000798 [0x00000000]
shdr[11].sh_addr 0x0000079c [0x00000000] the section's reside address(if not 0)
shdr[11].sh_offset 0x000007a0 [0x00000d64] the section's byte offset
shdr[11].sh_size 0x000007a4 [0x00000024] section size
shdr[11].sh_link 0x000007a8 [0x00000010] section header table index link
shdr[11].sh_info 0x000007ac [0x0000000a] extra information See PDF for more
shdr[11].sh_addralign 0x000007b0 [0x00000004] alignment 0 and 1 for none
shdr[11].sh_entsize 0x000007b4 [0x0000000c] fixed-size entries 0 for none fixed
shdr[12].sh_name 0x000007b8 [0x00000072] [.mdebug.abiN32]
shdr[12].sh_type 0x000007bc [0x00000001] SHT_PROGBITS Program data
shdr[12].sh_flags 0x000007c0 [0x00000000]
shdr[12].sh_addr 0x000007c4 [0x00000000] the section's reside address(if not 0)
shdr[12].sh_offset 0x000007c8 [0x00000520] the section's byte offset
shdr[12].sh_size 0x000007cc [0x00000000] section size
shdr[12].sh_link 0x000007d0 [0x00000000] section header table index link
shdr[12].sh_info 0x000007d4 [0x00000000] extra information See PDF for more
shdr[12].sh_addralign 0x000007d8 [0x00000001] alignment 0 and 1 for none
shdr[12].sh_entsize 0x000007dc [0x00000000] fixed-size entries 0 for none fixed
shdr[13].sh_name 0x000007e0 [0x00000081] [.gnu.attributes]
shdr[13].sh_type 0x000007e4 [0x6ffffff5] Unknow value.
shdr[13].sh_flags 0x000007e8 [0x00000000]
shdr[13].sh_addr 0x000007ec [0x00000000] the section's reside address(if not 0)
shdr[13].sh_offset 0x000007f0 [0x00000520] the section's byte offset
shdr[13].sh_size 0x000007f4 [0x00000010] section size
shdr[13].sh_link 0x000007f8 [0x00000000] section header table index link
shdr[13].sh_info 0x000007fc [0x00000000] extra information See PDF for more
shdr[13].sh_addralign 0x00000800 [0x00000001] alignment 0 and 1 for none
shdr[13].sh_entsize 0x00000804 [0x00000000] fixed-size entries 0 for none fixed
shdr[14].sh_name 0x00000808 [0x00000091] [.modname]
shdr[14].sh_type 0x0000080c [0x00000001] SHT_PROGBITS Program data
shdr[14].sh_flags 0x00000810 [0x00000000]
shdr[14].sh_addr 0x00000814 [0x00000000] the section's reside address(if not 0)
shdr[14].sh_offset 0x00000818 [0x00000530] the section's byte offset
shdr[14].sh_size 0x0000081c [0x0000000b] section size
shdr[14].sh_link 0x00000820 [0x00000000] section header table index link
shdr[14].sh_info 0x00000824 [0x00000000] extra information See PDF for more
shdr[14].sh_addralign 0x00000828 [0x00000001] alignment 0 and 1 for none
shdr[14].sh_entsize 0x0000082c [0x00000000] fixed-size entries 0 for none fixed
shdr[15].sh_name 0x00000830 [0x00000011] [.shstrtab]
shdr[15].sh_type 0x00000834 [0x00000003] SHT_STRTAB String table
shdr[15].sh_flags 0x00000838 [0x00000000]
shdr[15].sh_addr 0x0000083c [0x00000000] the section's reside address(if not 0)
shdr[15].sh_offset 0x00000840 [0x0000053b] the section's byte offset
shdr[15].sh_size 0x00000844 [0x0000009a] section size
shdr[15].sh_link 0x00000848 [0x00000000] section header table index link
shdr[15].sh_info 0x0000084c [0x00000000] extra information See PDF for more
shdr[15].sh_addralign 0x00000850 [0x00000001] alignment 0 and 1 for none
shdr[15].sh_entsize 0x00000854 [0x00000000] fixed-size entries 0 for none fixed
shdr[16].sh_name 0x00000858 [0x00000001] [.symtab]
shdr[16].sh_type 0x0000085c [0x00000002] SHT_SYMTAB Symbol table
shdr[16].sh_flags 0x00000860 [0x00000000]
shdr[16].sh_addr 0x00000864 [0x00000000] the section's reside address(if not 0)
shdr[16].sh_offset 0x00000868 [0x000008a8] the section's byte offset
shdr[16].sh_size 0x0000086c [0x00000170] section size
shdr[16].sh_link 0x00000870 [0x00000011] section header table index link
shdr[16].sh_info 0x00000874 [0x0000000e] extra information See PDF for more
shdr[16].sh_addralign 0x00000878 [0x00000004] alignment 0 and 1 for none
shdr[16].sh_entsize 0x0000087c [0x00000010] fixed-size entries 0 for none fixed
shdr[17].sh_name 0x00000880 [0x00000009] [.strtab]
shdr[17].sh_type 0x00000884 [0x00000003] SHT_STRTAB String table
shdr[17].sh_flags 0x00000888 [0x00000000]
shdr[17].sh_addr 0x0000088c [0x00000000] the section's reside address(if not 0)
shdr[17].sh_offset 0x00000890 [0x00000a18] the section's byte offset
shdr[17].sh_size 0x00000894 [0x000000b8] section size
shdr[17].sh_link 0x00000898 [0x00000000] section header table index link
shdr[17].sh_info 0x0000089c [0x00000000] extra information See PDF for more
shdr[17].sh_addralign 0x000008a0 [0x00000001] alignment 0 and 1 for none
shdr[17].sh_entsize 0x000008a4 [0x00000000] fixed-size entries 0 for none fixed
********** Symbol Table START ********** Symbol Table '.smytab' contains 23 entries:
Num: Value Size Type Bind Vis Ndx Name
0 0x00000000 0 NOTYPE LOCAL 0x00 UND
1 0x00000000 0 SECTION LOCAL 0x00 2
2 0x00000000 0 SECTION LOCAL 0x00 4
3 0x00000000 0 SECTION LOCAL 0x00 6
4 0x00000354 28 FUNC LOCAL 0x00 2 grub_mod_init
5 0x00000370 24 FUNC LOCAL 0x00 2 grub_mod_fini
6 0x00000000 0 SECTION LOCAL 0x00 1
7 0x00000000 0 SECTION LOCAL 0x00 5
8 0x00000000 0 SECTION LOCAL 0x00 8
9 0x00000000 0 SECTION LOCAL 0x00 9
10 0x00000000 0 SECTION LOCAL 0x00 10
11 0x00000000 0 SECTION LOCAL 0x00 12
12 0x00000000 0 SECTION LOCAL 0x00 13
13 0x00000000 0 SECTION LOCAL 0x00 14
14 0x00000000 0 NOTYPE GLOBAL 0x00 UND __gnu_local_gp
15 0x00000000 0 NOTYPE GLOBAL 0x00 UND grub_partition_map_list
16 0x00000000 0 NOTYPE GLOBAL 0x00 UND grub_disk_read
17 0x00000000 0 NOTYPE GLOBAL 0x00 UND grub_errno
18 0x00000000 852 FUNC GLOBAL 0x00 2 grub_partition_msdos_iterate
19 0x00000000 0 NOTYPE GLOBAL 0x00 UND grub_real_dprintf
20 0x00000000 0 NOTYPE GLOBAL 0x00 UND grub_error
21 0x00000000 0 NOTYPE GLOBAL 0x00 UND grub_list_remove
22 0x00000000 0 NOTYPE GLOBAL 0x00 UND grub_list_push********** Relocation Section START **********
Relocation section '.rela.text' at offset 0xad0 contains 53 entries:
Offset Info Type Sym.Value Sym.Name +Append
0x00000014 0x00000e05 R_MIPS_HI16 0x0000000e __gnu_local_gp 0x00000018 0x00000305 R_MIPS_HI16 0x00000003 .data.rel 0x00000040 0x00000e06 R_MIPS_LO16 0x0000000e __gnu_local_gp 0x00000050 0x00000306 R_MIPS_LO16 0x00000003 .data.rel 0x0000006c 0x00000205 R_MIPS_HI16 0x00000002 .rodata.str1.8 0x00000070 0x00000104 R_MIPS_26 0x00000001 .text + 0x00000088 0x0000007c 0x00000104 R_MIPS_26 0x00000001 .text + 0x00000188 0x00000080 0x00000206 R_MIPS_LO16 0x00000002 .rodata.str1.8 0x0000008c 0x00000205 R_MIPS_HI16 0x00000002 .rodata.str1.8 + 0x00000058 0x00000090 0x00000205 R_MIPS_HI16 0x00000002 .rodata.str1.8 + 0x00000068 0x000000ac 0x00000206 R_MIPS_LO16 0x00000002 .rodata.str1.8 + 0x00000058 0x000000b0 0x00000206 R_MIPS_LO16 0x00000002 .rodata.str1.8 + 0x00000068 0x000000b4 0x0000100b R_MIPS_CALL16 0x00000010 grub_disk_read 0x000000d0 0x00001025 R_MIPS_JALR 0x00000010 grub_disk_read 0x00000100 0x00000205 R_MIPS_HI16 0x00000002 .rodata.str1.8 + 0x00000018 0x00000108 0x00000104 R_MIPS_26 0x00000001 .text + 0x00000188 0x0000010c 0x00000206 R_MIPS_LO16 0x00000002 .rodata.str1.8 + 0x00000018 0x00000128 0x00000205 R_MIPS_HI16 0x00000002 .rodata.str1.8 + 0x00000028 0x00000130 0x00000104 R_MIPS_26 0x00000001 .text + 0x00000188 0x00000134 0x00000206 R_MIPS_LO16 0x00000002 .rodata.str1.8 + 0x00000028 0x00000154 0x00000205 R_MIPS_HI16 0x00000002 .rodata.str1.8 + 0x00000038 0x0000015c 0x00000104 R_MIPS_26 0x00000001 .text + 0x00000188 0x00000160 0x00000206 R_MIPS_LO16 0x00000002 .rodata.str1.8 + 0x00000038 0x0000017c 0x00000205 R_MIPS_HI16 0x00000002 .rodata.str1.8 + 0x00000048 0x00000184 0x00000206 R_MIPS_LO16 0x00000002 .rodata.str1.8 + 0x00000048 0x00000188 0x0000140b R_MIPS_CALL16 0x00000014 grub_error 0x0000018c 0x00001425 R_MIPS_JALR 0x00000014 grub_error 0x00000194 0x00000104 R_MIPS_26 0x00000001 .text + 0x00000324 0x000001f4 0x0000130b R_MIPS_CALL16 0x00000013 grub_real_dprintf 0x000001fc 0x00000205 R_MIPS_HI16 0x00000002 .rodata.str1.8 + 0x00000078 0x00000218 0x00000206 R_MIPS_LO16 0x00000002 .rodata.str1.8 + 0x00000078 0x0000022c 0x00001325 R_MIPS_JALR 0x00000013 grub_real_dprintf 0x00000274 0x00000104 R_MIPS_26 0x00000001 .text + 0x000001a8 0x000002a4 0x00000104 R_MIPS_26 0x00000001 .text + 0x000002d8 0x000002cc 0x00001113 R_MIPS_GOT_DISP 0x00000011 grub_errno 0x000002d0 0x00000104 R_MIPS_26 0x00000001 .text + 0x00000320 0x000002f8 0x00000104 R_MIPS_26 0x00000001 .text + 0x00000310 0x00000308 0x00000104 R_MIPS_26 0x00000001 .text + 0x000002d0 0x0000030c 0x00001113 R_MIPS_GOT_DISP 0x00000011 grub_errno 0x00000318 0x00000104 R_MIPS_26 0x00000001 .text + 0x000000b4 0x00000354 0x00000e05 R_MIPS_HI16 0x0000000e __gnu_local_gp 0x00000358 0x00000e06 R_MIPS_LO16 0x0000000e __gnu_local_gp 0x0000035c 0x00000f13 R_MIPS_GOT_DISP 0x0000000f grub_partition_map_list 0x00000360 0x00001613 R_MIPS_GOT_DISP 0x00000016 grub_list_push 0x00000364 0x00000305 R_MIPS_HI16 0x00000003 .data.rel 0x00000368 0x00001625 R_MIPS_JALR 0x00000016 grub_list_push 0x0000036c 0x00000306 R_MIPS_LO16 0x00000003 .data.rel 0x00000370 0x00000e05 R_MIPS_HI16 0x0000000e __gnu_local_gp 0x00000374 0x00000e06 R_MIPS_LO16 0x0000000e __gnu_local_gp 0x00000378 0x00001513 R_MIPS_GOT_DISP 0x00000015 grub_list_remove 0x0000037c 0x00000305 R_MIPS_HI16 0x00000003 .data.rel 0x00000380 0x00001525 R_MIPS_JALR 0x00000015 grub_list_remove 0x00000384 0x00000306 R_MIPS_LO16 0x00000003 .data.rel
Relocation section '.rela.data.rel' at offset 0xd4c contains 2 entries:
Offset Info Type Sym.Value Sym.Name +Append
0x00000008 0x00000202 R_MIPS_32 0x00000002 .rodata.str1.8 + 0x000000b8 0x0000000c 0x00001202 R_MIPS_32 0x00000012 grub_partition_msdos_iterate
Relocation section '.rela.pdr' at offset 0xd64 contains 3 entries:
Offset Info Type Sym.Value Sym.Name +Append
0x00000000 0x00001202 R_MIPS_32 0x00000012 grub_partition_msdos_iterate 0x00000020 0x00000102 R_MIPS_32 0x00000001 .text + 0x00000354 0x00000040 0x00000102 R_MIPS_32 0x00000001 .text + 0x00000370