[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] WinCE ARM code
From: |
Timo VJ Lähde |
Subject: |
Re: [Tinycc-devel] WinCE ARM code |
Date: |
Fri, 16 Apr 2010 12:31:36 +0300 |
Thanks Daniel.
So something like this:
#ifdef TCC_TARGET_ARM
DWORD *pdw;
pdw = section_ptr_add(text_section, 8+4); // room for
code and address
*pdw = 0xE59FC000; // arm code ldr ip, [pc] ; PC+8+0 =
0001xxxx
*(pdw+1) = 0xE59CF000; // arm code ldr pc, [ip]
#else
p = section_ptr_add(text_section, 8);
*p = 0x25FF;
#ifdef TCC_TARGET_X86_64
*(DWORD*)(p+1) = (DWORD)-4;
#endif
#endif
#ifdef TCC_TARGET_ARM
put_elf_reloc(symtab_section, text_section,
offset + 8, R_XXX_THUNKFIX, is->iat_index); //
offset to IAT position
#else
put_elf_reloc(symtab_section, text_section,
offset + 2, R_XXX_THUNKFIX, is->iat_index);
#endif
-- Timppa
----- Original Message -----
From: "Daniel Glöckner" <address@hidden>
To: <address@hidden>
Sent: Friday, April 16, 2010 4:02 AM
Subject: Re: [Tinycc-devel] WinCE ARM code
On Thu, Apr 15, 2010 at 06:21:10PM +0300, Timo VJ Lähde wrote:
Is that correct code ?
[00011038] 204825FF strcsd r2, [r8], #-5F
[0001103C] 00000001 andeq r0, r0, r1
Yes, on x86 that's
[00011038] ff 25 48 20 01 00 jmp dword near [dword 0x12048]
Should it be more something like this:
[00011038] E59FC000 ldr ip, [pc] ; PC+8+0 = 00011040
[0001103C] E59CF000 ldr pc, [ip]
[00011040] 00012030 andeq r2, r1, r0, lsr r0
Feel free to fix pe_check_symbols()
Daniel
_______________________________________________
Tinycc-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/tinycc-devel
tccpe.c.wince.patch
Description: Binary data