@chrQuote from: chr on 17 / August / 2008, 09:53:48Mh, I compared with my file. I got:CONTENTS, ALLOC, LOAD, CODESo, ALLOC & LOAD sections are missing?if i understand your last post correctly, i changed disassemble.pl like this:Code: [Select]print "create elf file\n";`$objcopy --change-addresses=$offset -I binary -O elf32-littlearm -B arm $binfile $binfile.elf`;`$objcopy --set-section-flags .data=load $binfile.elf`; <--- ADDED THIS`$objcopy --set-section-flags .data=code $binfile.elf`; but "arm-elf-objdump -x dump.bin.elf" output remains the same...
Mh, I compared with my file. I got:CONTENTS, ALLOC, LOAD, CODE
print "create elf file\n";`$objcopy --change-addresses=$offset -I binary -O elf32-littlearm -B arm $binfile $binfile.elf`;`$objcopy --set-section-flags .data=load $binfile.elf`; <--- ADDED THIS`$objcopy --set-section-flags .data=code $binfile.elf`;
--set-section-flags section=flags Set the flags for the named section. The flags argument is a comma separated string of flag names. The recognized names are alloc, contents, load, noload, readonly, code, data, rom, share, and debug. You can set the contents flag for a section which does not have contents, but it is not meaningful to clear the contents flag of a section which does have contents--just remove the section instead. Not all flags are meaningful for all object file for? mats.
From the objcopy man page: --set-section-flags section=flags Set the flags for the named section. The flags argument is a comma separated string of flag names. The recognized names are alloc, contents, load, noload, readonly, code, data, rom, share, and debug. You can set the contents flag for a section which does not have contents, but it is not meaningful to clear the contents flag of a section which does have contents--just remove the section instead. Not all flags are meaningful for all object file for? mats.
print "create elf file\n";`$objcopy --change-addresses=$offset -I binary -O elf32-littlearm -B arm $binfile $binfile.elf`;`$objcopy --set-section-flags .data=content,alloc,load,code $binfile.elf`;
Sections:Idx Name Size VMA LMA File off Algn 0 .data 0036a640 ff810000 ff810000 00000034 2**0 CONTENTS, ALLOC, LOAD, CODESYMBOL TABLE:ff810000 l d .data 00000000 ff810000 g .data 00000000 _binary_dump_bin_startffb7a640 g .data 00000000 _binary_dump_bin_end0036a640 g *ABS* 00000000 _binary_dump_bin_size
#ifndef __STUBS_ASM__H__#define __STUBS_ASM__H__
#endif
primary.elf: file format elf32-littlearmDisassembly of section .data:ffc00000 <_binary_PRIMARY_BIN_start>: 0: e3a00002 mov r0, #2 ; 0x2 4: ea000012 b ffc00054 <_binary_PRIMARY_BIN_start+0x54> 8: 79706f43 ldmdbvc r0!, {r0, r1, r6, r8, r9, sl, fp, sp, lr}^ c: 68676972 stmdavs r7!, {r1, r4, r5, r6, r8, fp, s
primary.elf: file format elf32-littlearmDisassembly of section .data:ffc00000 <_binary_PRIMARY_BIN_start>:ffc00000: e3a00002 mov r0, #2 ; 0x2ffc00004: ea000012 b ffc00054 <_binary_PRIMARY_BIN_start+0x54>ffc00008: 79706f43 ldmdbvc r0!, {r0, r1, r6, r8, r9, sl, fp, sp, lr}^ffc0000c: 68676972 stmdavs r7!, {r1, r4, r5, r6, r8, fp, sp, lr}^
The funny thing is, if I remove that one last byte from the a530 dump, it works like a charm! Have I encountered a bug or are we just not using these tools properly?
I have binutils-2.18.tar.gz gcc-3.4.6.tar.bz2 gdb-6.8.tar.gz set up on 64-bit Ubuntu Hardy.
c:\qemu-0.9.1-windows\bin>qemu-system-arm.exe -kernel PRIMARY_A470-102c.binqemu: fatal: Unimplemented cp15 register write (c5, c0, {0, 2})R00=03333330 R01=00000000 R02=00000100 R03=00000000R04=00000000 R05=00000000 R06=00000000 R07=00000000R08=00000000 R09=00000000 R10=00000000 R11=00000000R12=00000000 R13=00000000 R14=00000000 R15=00010078PSR=400001d3 -Z-- A svc32s00=00000000( 0) s01=00000000( 0) d00=0000000000000000( 0)s02=00000000( 0) s03=00000000( 0) d01=0000000000000000( 0)s04=00000000( 0) s05=00000000( 0) d02=0000000000000000( 0)s06=00000000( 0) s07=00000000( 0) d03=0000000000000000( 0)s08=00000000( 0) s09=00000000( 0) d04=0000000000000000( 0)s10=00000000( 0) s11=00000000( 0) d05=0000000000000000( 0)s12=00000000( 0) s13=00000000( 0) d06=0000000000000000( 0)s14=00000000( 0) s15=00000000( 0) d07=0000000000000000( 0)s16=00000000( 0) s17=00000000( 0) d08=0000000000000000( 0)s18=00000000( 0) s19=00000000( 0) d09=0000000000000000( 0)s20=00000000( 0) s21=00000000( 0) d10=0000000000000000( 0)s22=00000000( 0) s23=00000000( 0) d11=0000000000000000( 0)s24=00000000( 0) s25=00000000( 0) d12=0000000000000000( 0)s26=00000000( 0) s27=00000000( 0) d13=0000000000000000( 0)s28=00000000( 0) s29=00000000( 0) d14=0000000000000000( 0)s30=00000000( 0) s31=00000000( 0) d15=0000000000000000( 0)FPSCR: 00000000This application has requested the Runtime to terminate it in an unusual way.Please contact the application's support team for more information.
is there a working 'ixus' patch against qemu 0.11 ?