NAME=Gameboy: Sections
FILE=bins/gbc/a.gb
CMDS=<<EOF
ia
echo ---
iH
echo ---
oml
EOF
EXPECT=<<EOF
[Info]
arch     gb
cpu      N/A
features N/A
baddr    0x00000000
binsz    0x00010000
bintype  N/A
bits     16
class    N/A
compiler N/A
dbg_file N/A
endian   LE
hdr.csum N/A
guid     N/A
intrp    N/A
laddr    0x00000000
lang     N/A
machine  GameBoy
maxopsz  3
minopsz  1
os       any
cc       N/A
pcalign  1
rpath    N/A
subsys   
stripped true
havecode true
va       true
static   true
linenum  false
lsyms    false
canary   false
pie      false
relrocs  false
nx       false

[Imports]
nth vaddr bind type lib name 
-----------------------------

[Entries]
     vaddr      paddr     hvaddr      haddr type    
----------------------------------------------------
0x00000100 0x00000100 ---------- ---------- program
0x00000150 0x00000150 ---------- ---------- init

[Exports]
nth paddr vaddr bind type size lib name 
----------------------------------------

[Classes]
address min max name super 
---------------------------

[Symbols]
nth      paddr      vaddr bind type size lib name                       
------------------------------------------------------------------------
  0 0x00000000 0x00000000 NONE NONE    1     rst_0
  1 0x00000008 0x00000008 NONE NONE    1     rst_8
  2 0x00000010 0x00000010 NONE NONE    1     rst_16
  3 0x00000018 0x00000018 NONE NONE    1     rst_24
  4 0x00000020 0x00000020 NONE NONE    1     rst_32
  5 0x00000028 0x00000028 NONE NONE    1     rst_40
  6 0x00000030 0x00000030 NONE NONE    1     rst_48
  7 0x00000038 0x00000038 NONE NONE    1     rst_56
  8 0x00000040 0x00000040 NONE NONE    1     Interrupt_Vblank
  9 0x00000048 0x00000048 NONE NONE    1     Interrupt_LCDC-Status
 10 0x00000050 0x00000050 NONE NONE    1     Interrupt_Timer-Overflow
 11 0x00000058 0x00000058 NONE NONE    1     Interrupt_Serial-Transfere
 12 0x00000060 0x00000060 NONE NONE    1     Interrupt_Joypad

[Sections]
     paddr   size      vaddr  vsize align perm name       type flags 
---------------------------------------------------------------------
0x00000000 0x4000 0x00000000 0x4000   0x0 -r-x rom_bank00      
0x00004000 0x4000 0x00004000 0x4000   0x0 -r-x rom_bank01      
0x00008000 0x4000 0x00014000 0x4000   0x0 -r-x rom_bank02      
0x0000c000 0x4000 0x00024000 0x4000   0x0 -r-x rom_bank03      

[Memory]
name        size    address flags mirror 
-----------------------------------------
fastram     0x80 0x0000ff80 rwx   
ioports     0x4c 0x0000ff00 rwx   
oam         0xa0 0x0000fe00 rwx   
videoram  0x2000 0x00008000 rwx   
iram      0x2000 0x0000c000 rwx   
iram_echo 0x1e00 0x0000e000 r-x   iram

[Strings]
paddr vaddr len size section type string 
-----------------------------------------

---
gb:
  main_address: 0x150
  nintendo_logo: |
    ce ed 66 66 cc 0d 00 0b 03 73 00 83 00 0c 00 0d |..ff.....s......|
    00 08 11 1f 88 89 00 0e dc cc 6e e6 dd dd d9 99 |..........n.....|
    bb bb 67 63 6e 0e ec cc dd dc 99 9f bb b9 33 3e |..gcn.........3>|
  title: "BASKETCASEBOY"
  licensee:
    old_code: 0x0
    readable: "none"
  sgb_flag:
    value: 0x0
    readable: "No SGB support"
  cartridge:
    value: 0x1
    readable: "ROM+MBC1"
  rom:
    value: 0x1
    readable: "64 KBytes (4 banks)"
  ram:
    value: 0x0
    readable: "None"
  destination:
    value: 0x0
    readable: "Japanese"
  mask_rom_version_number: 0x1
  header_checksum: 0x24
  global_checksum: 0xa499

---
 1 fd: 3 +0x00000000 0x00000000 * 0x00003fff r-x fmap.rom_bank00
 2 fd: 3 +0x00004000 0x00004000 - 0x00007fff r-x fmap.rom_bank01
 3 fd: 3 +0x00008000 0x00014000 - 0x00017fff r-x fmap.rom_bank02
 4 fd: 3 +0x0000c000 0x00024000 - 0x00027fff r-x fmap.rom_bank03
EOF
RUN
