arm/pe: use embed_objinfo in the Makefile
made some symbols globals in arm.v4a-wince.pe.S & arm.v4t-wince.pe.S
This commit is contained in:
parent
c19ffafd8d
commit
d76ef8e3cf
@ -265,26 +265,12 @@ arm.v4t-wince.pe% : tc_bfdname = elf32-littlearm
|
|||||||
|
|
||||||
arm.v4a-wince.pe.h : $(srcdir)/src/$$T.S
|
arm.v4a-wince.pe.h : $(srcdir)/src/$$T.S
|
||||||
$(call tc,gcc) -march=armv4 -c $< -o tmp/$T.bin
|
$(call tc,gcc) -march=armv4 -c $< -o tmp/$T.bin
|
||||||
ifeq (1,1)
|
|
||||||
$(call tc,m-objcopy) -R .text -R .data -R .bss tmp/$T.bin
|
|
||||||
$(call tc,m-objcopy) -R .note -R .comment tmp/$T.bin
|
|
||||||
$(call tc,m-objdump) -trwh tmp/$T.bin >> tmp/$T.bin
|
|
||||||
else
|
|
||||||
# FIXME: can we use --strip-unneeded on arm ??
|
|
||||||
$(call tc,embed_objinfo,tmp/$T.bin)
|
$(call tc,embed_objinfo,tmp/$T.bin)
|
||||||
endif
|
|
||||||
$(call tc,bin2h) --ident=nrv_loader_arm tmp/$T.bin $@
|
$(call tc,bin2h) --ident=nrv_loader_arm tmp/$T.bin $@
|
||||||
|
|
||||||
arm.v4t-wince.pe.h : $(srcdir)/src/$$T.S
|
arm.v4t-wince.pe.h : $(srcdir)/src/$$T.S
|
||||||
$(call tc,gcc) -march=armv4t -c $< -o tmp/$T.bin
|
$(call tc,gcc) -march=armv4t -c $< -o tmp/$T.bin
|
||||||
ifeq (1,1)
|
|
||||||
$(call tc,m-objcopy) -R .text -R .data -R .bss tmp/$T.bin
|
|
||||||
$(call tc,m-objcopy) -R .note -R .comment tmp/$T.bin
|
|
||||||
$(call tc,m-objdump) -trwh tmp/$T.bin >> tmp/$T.bin
|
|
||||||
else
|
|
||||||
# FIXME: can we use --strip-unneeded on arm ??
|
|
||||||
$(call tc,embed_objinfo,tmp/$T.bin)
|
$(call tc,embed_objinfo,tmp/$T.bin)
|
||||||
endif
|
|
||||||
$(call tc,bin2h) --ident=nrv_loader_thumb tmp/$T.bin $@
|
$(call tc,bin2h) --ident=nrv_loader_thumb tmp/$T.bin $@
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -55,6 +55,18 @@
|
|||||||
|
|
||||||
#define section .section
|
#define section .section
|
||||||
|
|
||||||
|
// p_armpe.cpp uses the following symbols, so they should be global
|
||||||
|
|
||||||
|
.globl SRC0
|
||||||
|
.globl DST0
|
||||||
|
.globl IATT
|
||||||
|
.globl ENTR
|
||||||
|
.globl FIBS
|
||||||
|
.globl FIBE
|
||||||
|
.globl BREL
|
||||||
|
.globl BIMP
|
||||||
|
.globl ONAM
|
||||||
|
|
||||||
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
|
||||||
.arm
|
.arm
|
||||||
|
|||||||
@ -29,6 +29,11 @@
|
|||||||
<jreiser@users.sourceforge.net>
|
<jreiser@users.sourceforge.net>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// p_armpe.cpp uses some symbols, so they should be global
|
||||||
|
// in thumb mode we need this S() macro hack to export a symbol which
|
||||||
|
// is used in an ldr statement
|
||||||
|
#define S(sym) .globl sym; sym: .L##sym
|
||||||
|
|
||||||
#define DEBUG 0
|
#define DEBUG 0
|
||||||
|
|
||||||
#define section .section
|
#define section .section
|
||||||
@ -65,12 +70,12 @@ section ExeStart
|
|||||||
ldr ip, ENTR
|
ldr ip, ENTR
|
||||||
bx ip
|
bx ip
|
||||||
|
|
||||||
SRC0: .long start_of_compressed
|
S(SRC0):.long start_of_compressed
|
||||||
SRCL: .long compressed_length
|
SRCL: .long compressed_length
|
||||||
DST0: .long start_of_uncompressed
|
S(DST0):.long start_of_uncompressed
|
||||||
DSTL: .long uncompressed_length
|
DSTL: .long uncompressed_length
|
||||||
IATT: .long 0, 0, 0, 0
|
S(IATT):.long 0, 0, 0, 0
|
||||||
ENTR: .long original_entry
|
S(ENTR):.long original_entry
|
||||||
|
|
||||||
.thumb
|
.thumb
|
||||||
|
|
||||||
@ -89,9 +94,9 @@ section Unfilter_0x50
|
|||||||
addval .req r2
|
addval .req r2
|
||||||
bufend .req r4
|
bufend .req r4
|
||||||
|
|
||||||
ldr buffer, FIBS
|
ldr buffer, .LFIBS
|
||||||
mov addval, #0
|
mov addval, #0
|
||||||
ldr bufend, FIBE
|
ldr bufend, .LFIBE
|
||||||
mov r5, #0x0f
|
mov r5, #0x0f
|
||||||
mov r6, #0xff
|
mov r6, #0xff
|
||||||
lsl r6, #24
|
lsl r6, #24
|
||||||
@ -122,8 +127,8 @@ section Unfilter_0x50
|
|||||||
.unreq bufend
|
.unreq bufend
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
FIBS: .long filter_buffer_start
|
S(FIBS):.long filter_buffer_start
|
||||||
FIBE: .long filter_buffer_end
|
S(FIBE):.long filter_buffer_end
|
||||||
|
|
||||||
.Luf50_ret:
|
.Luf50_ret:
|
||||||
|
|
||||||
@ -134,7 +139,7 @@ section Relocs
|
|||||||
dest .req r1
|
dest .req r1
|
||||||
addval .req r2
|
addval .req r2
|
||||||
|
|
||||||
ldr buffer, BREL
|
ldr buffer, .LBREL
|
||||||
mov addval, dst0
|
mov addval, dst0
|
||||||
sub dest, addval, #4
|
sub dest, addval, #4
|
||||||
|
|
||||||
@ -173,7 +178,7 @@ section Relocs
|
|||||||
b .Lreloc_loop
|
b .Lreloc_loop
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
BREL: .long start_of_relocs
|
S(BREL):.long start_of_relocs
|
||||||
|
|
||||||
.Lreloc_end:
|
.Lreloc_end:
|
||||||
|
|
||||||
@ -190,13 +195,13 @@ section Imports
|
|||||||
sub sp, #508
|
sub sp, #508
|
||||||
sub sp, #508
|
sub sp, #508
|
||||||
sub sp, #508
|
sub sp, #508
|
||||||
ldr imp, BIMP
|
ldr imp, .LBIMP
|
||||||
.Lhi_loop1:
|
.Lhi_loop1:
|
||||||
mov r0, imp
|
mov r0, imp
|
||||||
bl get_le32
|
bl get_le32
|
||||||
beq .Lhi_end
|
beq .Lhi_end
|
||||||
|
|
||||||
ldr r1, ONAM
|
ldr r1, .LONAM
|
||||||
add r0, r1
|
add r0, r1
|
||||||
mov r1, sp
|
mov r1, sp
|
||||||
.Lhi_copyname:
|
.Lhi_copyname:
|
||||||
@ -265,8 +270,8 @@ LoadLibraryW:
|
|||||||
GetProcAddressA:
|
GetProcAddressA:
|
||||||
bx r11
|
bx r11
|
||||||
|
|
||||||
BIMP: .long start_of_imports
|
S(BIMP):.long start_of_imports
|
||||||
ONAM: .long start_of_dll_names
|
S(ONAM):.long start_of_dll_names
|
||||||
|
|
||||||
.Lhi_end:
|
.Lhi_end:
|
||||||
mov sp, r7
|
mov sp, r7
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user