<div dir="ltr">Mi a fordito verzioja?</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">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<div class="im"><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></div>
Machine: MIPS R3000<br>
Version: 0x1<br>
Entry point address: 0x400220<div class="im"><br>
Start of program headers: 52 (bytes into file)<br></div>
Start of section headers: 2547360 (bytes into file)<br>
Flags: 0x70001005, noreorder, cpic, o32, mips32r2<div class="im"><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></div>
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<div class="im"><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></div>
Machine: MIPS R3000<br>
Version: 0x1<br>
Entry point address: 0x403bd0<div class="im"><br>
Start of program headers: 52 (bytes into file)<br></div>
Start of section headers: 781968 (bytes into file)<br>
Flags: 0x50001007, noreorder, pic, cpic, o32, mips32<div class="im"><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></div>
Section header string table index: 29<br>
<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>
<br>
2013-04-25 14:00 időpontban Bukuli Norbert ezt írta:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
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>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
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>
<br>
Zahy < Gabor at Zahemszky dot HU ><br>
______________________________<u></u>_________________<br>
BSD levlista<br>
<a href="mailto:BSD@hu.freebsd.org" target="_blank">BSD@hu.freebsd.org</a><br>
</div></div><a href="https://lists.hu.freebsd.org/mailman/listinfo/bsd" target="_blank">https://lists.hu.freebsd.org/<u></u>mailman/listinfo/bsd</a> [1]<br>
</blockquote><div class="im">
<br>
--<br>
Üdvözlettel:<br>
Bukuli Norbert<br>
<br>
Links:<br>
------<br>
[1] <a href="https://lists.hu.freebsd.org/mailman/listinfo/bsd" target="_blank">https://lists.hu.freebsd.org/<u></u>mailman/listinfo/bsd</a><br>
<br></div><div class="im">
______________________________<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></blockquote><div class="HOEnZb"><div class="h5">
<br>
______________________________<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>