Gast
#2366937
Moin, ich habe ein Problem (naja sonst würde ich ja nicht schreiben). Ich brauch eine Toolchain um Code für einen fertigen Router zu erzeugen. Die Hardware ist ein XScale PXA250 Prozessor mit ARM5 und installiertem Linux. Ich habe eine Toolchain mithilfe der crosstools (http://crosstool-ng.org/) erstellt. Bei der Konfiguration habe ich darauf geachtet, dass ich ARM auswähle, die FPU auf Software stelle und die entsprechenden Linux Header angebe. (Linux Version vom Router und die Quellen von kernel.org runtergeladen). Die Erstellung der Toolchain klappt (mit -mcpu=xscale -mfloat-abi=soft -static) aber wenn ich anschließed das Programm ausführe bekomme ich eine Illegal Instuction. Bei dem Vergleich einer Datei auf dem Router mit dem selbst generierten HalloWelt Programm erhalte ich noch folgende unterschiede: Funtionierende Datei des Routers: file init init: ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses shared libs), for GNU/Linux 2.2.0, stripped Mein Programm: file a.out a.out: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, not stripped Funtionierende Datei des Routers: readelf -h init ELF Header: Magic: 7f 45 4c 46 01 01 01 61 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: ARM ABI Version: 0 Type: EXEC (Executable file) Machine: ARM Version: 0x1 Entry point address: 0x9890 Start of program headers: 52 (bytes into file) Start of section headers: 26244 (bytes into file) Flags: 0x2, has entry point, GNU EABI Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 6 Size of section headers: 40 (bytes) Number of section headers: 27 Section header string table index: 26 Mein Programm: file a.out ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: ARM Version: 0x1 Entry point address: 0x80b0 Start of program headers: 52 (bytes into file) Start of section headers: 45868 (bytes into file) Flags: 0x5000002, has entry point, Version5 EABI Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 4 Size of section headers: 40 (bytes) Number of section headers: 22 Section header string table index: 19 Hat jemand ne Ahnung woran es liegen kann und eine Idee? Ich vermute die AS/ABI Version und suche da gerade (mit wenig erfolg) weiter... Ich würde mich für jeden Tip freuen... Mfg Michael