imgtools/romtools/rombuild/stubs.s
author Mike Kinghan <mikek@symbian.org>
Sat, 27 Nov 2010 17:23:11 +0000
changeset 41 1600211976c3
parent 2 39c28ec933dd
permissions -rwxr-xr-x
1) Add imgtools/romtools to the targets for which exports are performed by fix_tools_exports.pl 2) Windows compatibility fix to list_targets.pl 3) Modify imgtools\romtools\group\BLD.INF so that Windows-only exports are not performed on Linux hosts or vice versa. 4) Windows compatibility fix for imgtools\romtools\rombuild\romnibus.pl

@ Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
@ All rights reserved.
@ This component and the accompanying materials are made available
@ under the terms of the License "Eclipse Public License v1.0"
@ which accompanies this distribution, and is available
@ at the URL "http://www.eclipse.org/legal/epl-v10.html".
@
@ Initial Contributors:
@ Nokia Corporation - initial contribution.
@
@
@ Description:
@ DLL Stub routines
@ Compile with "gcc -c -Wa,-adhln stubs.s"
@
.text
	.code 32
	.globl  arm4_stub
arm4_stub:
	ldr     ip, [pc]
	ldr     pc, [ip]
	.word   0x11223344  @ address in IAT/edata

	.code 32
	.globl  armi_stub
armi_stub:
	ldr     ip, [pc, #4]
	ldr     pc, [ip]
	bx      ip
	.word   0x11223344  @ address in IAT/edata

	.code 16
	.globl  thumb_stub
thumb_stub:
	push    {r6}
	ldr     r6, [pc, #8]
	ldr     r6, [r6]
	mov     ip, r6
	pop     {r6}
	bx      ip
	.word   0x11223344	@ address in IAT/edata

	.code 16
	.globl  thumb_r3unused_stub
thumb_r3unused_stub:
	ldr     r3, [pc, #4]
	ldr     r3, [r3]
	bx      r3
	nop
	.word   0x11223344	@ address in IAT/edata


@ In-place rewrites if destination address
@ is fixed
@
	.code 32
	.globl  fast_armi_stub
fast_armi_stub:
	ldr     ip, [pc, #4]
	bx      ip
	.word   0           @ nop
	.word   0x50515253  @ destination address

	.code 16
	.globl  fast_thumb_stub
fast_thumb_stub:
	push    {r6}
	ldr     r6, [pc, #8]
	mov     ip, r6
	pop     {r6}
	bx      ip
	nop
	.word   0x50515253  @ destination address

	.code 16
	.globl  fast_thumb_r3unused_stub
fast_thumb_r3unused_stub:
	ldr     r3, [pc, #4]
	bx      r3
	nop
	nop
	.word   0x50515253  @ destination address