Hi, On Mon, Jul 24, 2006 at 09:44:54AM +0100, Thiemo Seufer wrote: > I can confirm that > - The hello world binary runs fine natively. > - elfsh loads this binary as expected on mips, and also on powerpc.
Sorry, I forgot to mention that I'm running elfsh itself on i386:
[EMAIL PROTECTED]:~$ md5sum `which elfsh` hello
f6f795a7c75c32bb8ab2c7575df23ba5 /usr/bin/elfsh
e515d70808598e0ff20b409a61271bec hello
[EMAIL PROTECTED]:~$ dpkg -l elfsh
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=============================-=============================-==========================================================================
ii elfsh 0.51b3-2.1 The ELF shell
[EMAIL PROTECTED]:~$ elfsh --version
The ELF shell 0.51b3
info .::. Extra details help screen info
load filepath .::. Load input file
save outputfile .::. Dump output file
unload obj{name,id} .::. Unload object without saving
switch obj{name,id} .::. Change the current working object
modload modpath .::. Load an ELFsh module
modunload mod{name,id} .::. Unload an ELFsh module
list .::. List loaded objects
help .::. Print this screen
fixup .::. Insert BSS section in corefile
findrel .::. Dump absolute references list
shtrm .::. Mark the SHT as removed
quit/exit .::. Quit the shell without saving
elf [e] .::. Print ELF header
interp [i] .::. Print .interp section
pht [p] regx .::. Print Program Header Table (PHT)
got [g] regx .::. Print Global Offset Table (GOT)
sht [s] regx .::. Print Section Header Table (SHT)
rel [r] regx .::. Print relocation tables entries
notes [n] regx .::. Print Notes sections entries
dyn [d] regx .::. Print .dynamic section entries
dynsym [ds] regx .::. Print dynamic symbtab entries (.dynsym)
sym [st] regx .::. Print symtab entries (.symtab)
stab [sb] regx .::. Print raw stab entries (.stabs)
ctors [ct] regx .::. Print .ctors section
dtors [dt] regx .::. Print .dtors section
disasm [D] regx:rva%size .::. Disassembly the matching objects
hexa [X] regx:rva%size .::. Dump in hexadecimal the matching objects
reladd objdst objsrc .::. Insert ET_REL into ET_EXEC
OP objdst objop .::. Arithmetics on objects (add/sub/mul/div/mod)
set objdst objsrc .::. Modify object value (see info)
get objdst .::. Print object value
append sctnam objsrc .::. Append data to section
extend sctnam size .::. Extend section (fill with 0x00)
write objdst objsrc .::. Transfer data between objects
print obj1 obj2 ... objN .::. Print sequence of objects or constants
redir func func2|addr .::. Redirect a function
Available prefixes :
all [a] regx .::. Give a global weak regular expression
sort [sr] {a,s} .::. Sort entries by address (a) or size (s)
quiet/verb .::. Toggle the verbosity flag
Available modules :
modtest .::. Sample test module
modremap .::. ET_EXEC immediate relocator
modflow .::. Control flow blocks grapher
[EMAIL PROTECTED]:~$ elfsh
Welcome to The ELF shell 0.51b3 .::.
.::. This software is under the General Public License
.::. Please visit http://www.gnu.org to know about Free Software
[ELFsh-0.51b3]$ load hello
Segmentation fault
[EMAIL PROTECTED]:~$ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 39
model name : AMD Athlon(tm) 64 Processor 3700+
stepping : 1
cpu MHz : 2210.298
cache size : 1024 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow pni
bogomips : 4374.52
> The first suspect which comes to mind is some endianness issue.
> Does ELFsh succeed in loading any object of the "other" endianness?
Yes, the i386 elfsh can load ELF binaries for i386 normally here.
>
> > More info:
> > 1) I built the cross compiler (gcc 3.4.1) with the crosstool script
> > from http://kegel.com/crosstool/crosstool-0.42/ since toolchain-source
> > failed (I haven't finished the bug report for this one yet).
>
> Toolchain-source is mostly obsolete now, you may want to build a cross
> toolchain from the standard gcc/binutils packages in debian instead.
> (See README.cross in the source of those packages.)
Thanks for the tip!
-Timo
pgp5edISHAQ6h.pgp
Description: PGP signature

