<div dir="ltr">Az ABI verzio sajnos toolchain fuggo, szoval azt valoszinuleg nem tudod megadni forditasi opciokent.</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/25 Potoczky Andras <span dir="ltr"><<a href="mailto:andras-ml@wertz.hu" target="_blank">andras-ml@wertz.hu</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Megtalaltam a little endian forditasi opciot es itt a hello readelf es az sh readelf:<br>
<br>
root@mips64:/home/andras/mips# readelf -h hello; readelf -h sh<br>
ELF Header:<br>
Magic: 7f 45 4c 46 01 01 01 00 01 00 00 00 00 00 00 00<br>
Class: ELF32<div class="im"><br>
Data: 2's complement, little endian<br>
Version: 1 (current)<br>
OS/ABI: UNIX - System V<br></div><div class="im">
ABI Version: 1<br>
Type: EXEC (Executable file)<br>
Machine: MIPS R3000<br>
Version: 0x1<br>
Entry point address: 0x400220<br>
Start of program headers: 52 (bytes into file)<br></div>
Start of section headers: 2553788 (bytes into file)<div class="im"><br>
Flags: 0x70001005, noreorder, cpic, o32, mips32r2<br>
Size of this header: 52 (bytes)<br>
Size of program headers: 32 (bytes)<br>
Number of program headers: 5<br>
Size of section headers: 40 (bytes)<br>
Number of section headers: 41<br>
Section header string table index: 38<br></div><div class="im">
ELF Header:<br>
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00<br>
Class: ELF32<br>
Data: 2's complement, little endian<br>
Version: 1 (current)<br>
OS/ABI: UNIX - System V<br>
ABI Version: 0<br>
Type: EXEC (Executable file)<br>
Machine: MIPS R3000<br>
Version: 0x1<br>
Entry point address: 0x403bd0<br>
Start of program headers: 52 (bytes into file)<br>
Start of section headers: 781968 (bytes into file)<br>
Flags: 0x50001007, noreorder, pic, cpic, o32, mips32<br>
Size of this header: 52 (bytes)<br>
Size of program headers: 32 (bytes)<br>
Number of program headers: 8<br>
Size of section headers: 40 (bytes)<br>
Number of section headers: 30<br>
Section header string table index: 29<br>
<br>
<br></div>
Most mar csak az ABI version elteres, de azt hiaba allitom. Lefordul, de 1-es marad.<br>
<br>
A gcc verzio egyebkent 4.4.6<br>
<br>
Feltoltottem a boxra a hello-t little endiannal. Most a hibauzenet:<br>
<br>
#./hello<br>
Illegal instruction<br>
<br>
Valtozott valamit.<br>
<br>
Andras<br>
<br>
<br>
<br>
2013-04-25 14:33 időpontban Bukuli Norbert ezt írta:<div class="HOEnZb"><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Mi a fordito verzioja?<br>
<br>
2013/4/25 Potoczky Andras <<a href="mailto:andras-ml@wertz.hu" target="_blank">andras-ml@wertz.hu</a>><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Lassuk:<br>
<br>
root@mips64:/home/andras/mips# readelf -h hello<br>
ELF Header:<br>
Magic: 7f 45 4c 46 01 02 01 00 01 00 00 00 00 00 00 00<br>
<br>
Class: ELF32<br>
Data: 2's complement, big endian<br>
Version: 1 (current)<br>
OS/ABI: UNIX - System V<br>
ABI Version: 1<br>
Type: EXEC (Executable file)<br>
Machine: MIPS R3000<br>
Version: 0x1<br>
Entry point address: 0x400220<br>
<br>
Start of program headers: 52 (bytes into file)<br>
Start of section headers: 2547360 (bytes into file)<br>
Flags: 0x70001005, noreorder, cpic, o32, mips32r2<br>
<br>
Size of this header: 52 (bytes)<br>
Size of program headers: 32 (bytes)<br>
Number of program headers: 5<br>
Size of section headers: 40 (bytes)<br>
Number of section headers: 41<br>
Section header string table index: 38<br>
root@mips64:/home/andras/mips# readelf -h sh<br>
ELF Header:<br>
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00<br>
Class: ELF32<br>
<br>
Data: 2's complement, little endian<br>
Version: 1 (current)<br>
OS/ABI: UNIX - System V<br>
ABI Version: 0<br>
Type: EXEC (Executable file)<br>
Machine: MIPS R3000<br>
Version: 0x1<br>
Entry point address: 0x403bd0<br>
<br>
Start of program headers: 52 (bytes into file)<br>
Start of section headers: 781968 (bytes into file)<br>
Flags: 0x50001007, noreorder, pic, cpic, o32, mips32<br>
<br>
Size of this header: 52 (bytes)<br>
Size of program headers: 32 (bytes)<br>
Number of program headers: 8<br>
Size of section headers: 40 (bytes)<br>
Number of section headers: 30<br>
Section header string table index: 29<br>
<br>
Latom, big endian es little endian elteres van.<br>
<br>
Gyorasan utannaneztem, marha egyszeru mbig-endian mlittle-endian optiokat kene hasznalni, csak a compiler ezeket nem ismeri.<br>
<br>
Turom meg, hatha ez lesz a jo irany.<br>
<br>
Andras<br>
<br>
2013-04-25 14:00 időpontban Bukuli Norbert ezt írta:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hasznos lehet a readelf is. Pl:<br>
<br>
$ readelf -h my_powerpc_program<br>
<br>
ELF Header:<br>
Magic: 7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 <br>
Class: ELF32<br>
Data: 2's complement, big endian<br>
Version: 1 (current)<br>
OS/ABI: UNIX - System V<br>
ABI Version: 0<br>
Type: EXEC (Executable file)<br>
Machine: PowerPC<br>
Version: 0x1<br>
Entry point address: 0x10001cb8<br>
Start of program headers: 52 (bytes into file)<br>
Start of section headers: 23156 (bytes into file)<br>
Flags: 0x0<br>
Size of this header: 52 (bytes)<br>
Size of program headers: 32 (bytes)<br>
Number of program headers: 8<br>
Size of section headers: 40 (bytes)<br>
Number of section headers: 40<br>
Section header string table index: 37<br>
<br>
$ readelf -h /bin/bash<br>
<br>
ELF Header:<br>
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 <br>
Class: ELF64<br>
Data: 2's complement, little endian<br>
Version: 1 (current)<br>
OS/ABI: UNIX - System V<br>
ABI Version: 0<br>
Type: EXEC (Executable file)<br>
Machine: Advanced Micro Devices X86-64<br>
Version: 0x1<br>
Entry point address: 0x419490<br>
Start of program headers: 64 (bytes into file)<br>
Start of section headers: 719608 (bytes into file)<br>
Flags: 0x0<br>
Size of this header: 64 (bytes)<br>
Size of program headers: 56 (bytes)<br>
Number of program headers: 10<br>
Size of section headers: 64 (bytes)<br>
Number of section headers: 27<br>
Section header string table index: 26<br>
<br>
2013. április 25. 13:49 írta, <<a href="mailto:gabor@zahemszky.hu" target="_blank">gabor@zahemszky.hu</a>>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2013-04-25 13:48 időpontban Potoczky Andras ezt írta:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A boxon nem tudom kiadni, mert nincs file, de elozo emailben pont<br>
elkuldtem, a fordito gepen a file kimenetet. Valami ilyen hiba lesz<br>
amit irsz, nem ertelmezi, csak meg nem jottem ra mitol fogja<br>
ertelmezni.<br>
</blockquote>
<br>
De azt is írtam, hogy egy a dobozról származó binárist (/bin/sh) is<br>
nézzél meg a fejlesztői gépeden és hasonlítsd össze őket.<br>
</blockquote></blockquote></blockquote></blockquote>
<br></div></div><div class="HOEnZb"><div class="h5">
______________________________<u></u>_________________<br>
BSD levlista<br>
<a href="mailto:BSD@hu.freebsd.org" target="_blank">BSD@hu.freebsd.org</a><br>
<a href="https://lists.hu.freebsd.org/mailman/listinfo/bsd" target="_blank">https://lists.hu.freebsd.org/<u></u>mailman/listinfo/bsd</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Üdvözlettel:<br>Bukuli Norbert
</div>