|
From: | Gaharwar, Harshit |
Subject: | Issue in mapping a portion of code in a particular memory section |
Date: | Thu, 23 Jan 2014 13:22:23 +0000 |
Hi, I am writing a code in iMX6Q board in GCC. I am trying to map a particular section in code inside ‘Test1.S’ file to some other location. The Code in Test1.S looks like: “.section "ns_image"
.global funct1 funct1: mov
r2,#0x3 bx lr” Similarly in the .ld I have divided the memory section as and initialized it as : MEMORY { RAM (RWX) : ORIGIN = 0x00000000, LENGTH = 0x2FFFFF MEM_NS(RWX):ORIGIN = 0x00300000, LENGTH = 0x2FFFFF } SECTIONS { .text : { * (vectors); * (.text); } > RAM .data : { * (.data); } > RAM .bss : { * (.bss ); } > RAM .rodata : { * (.rodata); } > RAM .non_secure : { __non_secure_start__ = . ;
*(ns_image)
__non_secure_end__ = . ; }>MEM_NS } With the above settings, when I generate a .map file I can see that test1.0 is mapped correctly as shown below: *(ns_image) ns_image 0x00300000 0x10 ./src/test1.o 0x00300000 wait_for_interrupt1 0x00300008 wait_for_interrupt2 0x00300010 __non_secure_end__ = . But when I try to load the code using QEMU, I am unable to see test1.0 mapped to memory corresponding to test1.0 in disassembly. Please find the screenshot attached which shows the same
issue. Rest of the code works fine which is mapped to RAM, but whatever is mapped to MEM_NS is having this issue. Can you please provide any guidelines how this can be configured correctly. What am I missing here? Thanks, Harshit |
error in disassembly.png
Description: error in disassembly.png
[Prev in Thread] | Current Thread | [Next in Thread] |