If the core is statically linked, and not in a .so, then that will work.I'm confused.. I thought that since the assembly code is being built into the core library rather than as a separate library, that I can use the linking options "-Xlinker --section-start -Xlinker .init=0x08000000" set up the memory layout correctly.
When I run the binary that I built from the original source based on mupen64plus v1.5, /proc/self/maps looks like this:
Code:
00008000-00021000 r--p 00000000 08:01 26198025 /media/sda1/devel/mupen64plus (ld.so symbol table)
07000000-08000000 rwxp 07000000 00:00 0 (dynarec target)
08000000-080ea000 r-xp 00020000 08:01 26198025 /media/sda1/devel/mupen64plus (.init, .text)
080f1000-080f6000 rw-p 00109000 08:01 26198025 /media/sda1/devel/mupen64plus (.data)
080f6000-09ed0000 rw-p 080f6000 00:00 0 [heap] (.bss)
40000000-4001d000 r-xp 00000000 b3:02 17317 /lib/ld-2.9.so
(...lots more shared libraries...)
450c8000-458c7000 rw-p 450c8000 00:00 0
458c7000-458d8000 r--p 00000000 08:01 24535139 /media/sda1/devel/fonts/font.ttf
458d8000-4592c000 rw-p 458d8000 00:00 0
80000000-80800000 rw-p 80000000 00:00 0 (rdram)
bedcc000-bede2000 rw-p befea000 00:00 0 [stack]
Using gdb, I can verify that the relevant offsets are within 32M
Code:
(gdb) print/x &dyna_linker
$1 = 0x80cacc4
(gdb) print 0x80cacc4-0x7000000
$2 = 17607876