NAME=ELF: arm relocs
FILE=bins/elf/analysis/arm-relocs
CMDS=<<EOF
ir*~reloc?
ir*~!1
EOF
EXPECT=<<EOF
11
fs relocs
"f reloc.r0 4 0x08000034"
"f reloc.r2 4 0x0800003c"
"f reloc.r3 4 0x08000040"
"f reloc.r4 4 0x08000044"
"f reloc.r0 4 0x0800004c"
"f reloc.r2 4 0x08000054"
"f reloc.r3 4 0x08000058"
"f reloc.r4 4 0x0800005c"
EOF
RUN

NAME=ELF: ppc relocs
FILE=bins/elf/hello.ppc
CMDS=<<EOF
ii
ir
s main
af
pdsf
EOF
EXPECT=<<EOF
[Imports]
nth vaddr      bind   type   lib name
-------------------------------------
1   0x00000000 GLOBAL FUNC       printf
2   0x00000000 WEAK   NOTYPE     __gmon_start__
3   0x00000000 GLOBAL FUNC       __libc_start_main

[Relocations]

vaddr      paddr      type   name
---------------------------------
0x10020008 0x00010008 ADD_32 __gmon_start__
0x10020064 0x10020064 ADD_32 printf
0x10020064 0x10020064 ADD_32 printf
0x1002006c 0x1002006c ADD_32 __gmon_start__
0x1002006c 0x1002006c ADD_32 __gmon_start__
0x10020074 0x10020074 ADD_32 __libc_start_main
0x10020074 0x10020074 ADD_32 __libc_start_main


7 relocations
0x100004a0 str.Simple_PPC_program. str.Simple_PPC_program.
EOF
RUN
