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" <[email protected]>
To: <[email protected]> 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, r1Yes, 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 r0Feel free to fix pe_check_symbols() Daniel _______________________________________________ Tinycc-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/tinycc-devel
tccpe.c.wince.patch
Description: Binary data
_______________________________________________ Tinycc-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/tinycc-devel
