Home > OS >  Connection address
Connection address

Time:09-29

I want to make clear the concept of connection Address, changing the link Address to 0 XFFFF FFFC, purpose is to want to see it after the overflow effect, this compilation after burning, found that the led will light up, as if there is no effect, and then I look at the disassembly code, found only two lines of assembly code, the Address of the first line is 0 XFFFF FFFC, is the second line Address 0 x0, Address 0 x0 is out of bounds, so how can run normally? We wish to enter into a labyrinth,
Source program is as follows (simple lamps procedures, the arm is 2440) :


Int main ()
{
Unsigned int * pGPFCON=(unsigned int *) 0 x56000050;
Unsigned int * pGPFDAT=(unsigned int *) 0 x56000054;


* pGPFCON=0 x100;


* pGPFDAT=0;

return 0;
}

The makefile is as follows:

All:
Arm - Linux - GCC - c - o led. O led. C
Arm - Linux - GCC - c - o start. O start. S
Arm - Linux - ld - Ttext 0 XFFFFFFFC start. O led. O - o led. The elf
Arm - Linux - objcopy - O binary - S led. The elf led. Bin
Arm - Linux - objdump -d led. The elf & gt; Leds. Dis
Clean:
Rm *. Bin * o * * elf. Dis

CodePudding user response:

You are using 2440 baremetal model test program?
If yes, use should be led. If bin objcopy after things with connector it doesn't matter,
Program you don't have a prototype of this address to burning,
Objdump parsed when the elf address overflow, so just show 2 assembly code,


  • Related