c program, "hhhhhhh" corresponds to 686868 ..... // There are also global initialization constants modified using const. the above const int finalone variable. it only corresponds to 848c zookeeper. sassembly of section. rodata: 00008488
: 848c: 0000000aandeqr0, r0, sl8490: 686868681_davsr8 !, {R3, r5, r6, fp, sp, lr} ^ 8494: 6868681_davsr8 !, {R3, r5, r6, fp, sp, lr} ^ 8498: 00000068andeqr0, r
normally.Then enter gcc–version,g++--version,make–version,gdb–version for testing, and if you print out the version information and some descriptive information, the Cygwin installation is successful!3. Configure NDK Environment variablesAFirst find the Cygwin installation directory, find a home\b Open a. bash_profile file, add ndk=/cygdrive/Ndk=/cygdrive/e/android-ndk-r5Export NDKThe NDK name is random, for the convenience of later use, choose a short name, and then saveC Open Cygwin, enter th
the SRC item is the source code. This is unnecessary.
11. Test whether cygwin has been installed.
Run cygwin. In the displayed command line window, enter the cygcheck-C cygwin command to print the current cygwin version and running status. If the status is OK, cygwin runs normally.
Enter gcc-V, G ++ -- version, make-version, and GDB-version in sequence for testing. (note the space and-) if both print the published information and some description information, we are very happy to tell you that
ndk is downloaded ).
Appendix:
Android SDK: 3.0
Windows
Http://dl.google.com/android/installer_r10-windows.exe
Http://dl.google.com/android/android-sdk_r10-windows.zip
Mac OS X (Intel)
Http://dl.google.com/android/android-sdk_r10-mac_x86.zip
Linux (i386)
Http://dl.google.com/android/android-sdk_r10-linux_x86.tgz
Android ndk r5b
Windows
Http://dl.google.com/android/ndk/android-ndk-r5b-windows.zip
Mac OS X (Intel)
Http://dl.google.com/android/ndk/android-ndk-r5b-darwin-x86.tar.bz2
Linux
Http
Field 8; x length 8 bytes, relative position 8
Y Field 8; y length is 8 bytes, relative position is 16
String Field 256; String Length: 256 bytes; relative position: 24
LDR R6, Consta; reference data fields in the memory table
Map 4096; the first address of the memory table is 4096 (0x1000)
Consta field 4; Consta length is 4 bytes, relative position is 0
Constb field 4; constb length is 4 bytes, relative position is 4
X Field 8; x length 8 bytes, relative position 8
Y Field 8; y length is 8 by
Android SDK Android ndk official
Android SDK
Windows
Http://dl.google.com/android/android-sdk_r08-windows.zip
Http://dl.google.com/android/installer_r08-windows.exe
Linux (i386)
Http://dl.google.com/android/android-sdk_r08-linux_86.tgz
Mac OS X (Intel)
Http://dl.google.com/android/android-sdk_r08-mac_86.zip
Android ndk
Windows
Http://dl.google.com/android/ndk/android-ndk-r5-windows.zip
Mac OS X (Intel)
Http://dl.google.com/android/ndk/android-ndk-
(intel)
Http://dl.google.com/android/ndk/android-ndk-r5b-darwin-x86.tar.bz2
Linux
Http://dl.google.com/android/ndk/android-ndk-r5b-linux-x86.tar.bz2
Android SDK: 3.0
Windows
Http://dl.google.com/android/installer_r10-windows.exe
Http://dl.google.com/android/android-sdk_r10-windows.zip
Mac OS X (intel)
Http://dl.google.com/android/android-sdk_r10-mac_x86.zip
Linux (i386)
Http://dl.google.com/android/android-sdk_r10-linux_x86.tgz
Android SDK: 2.3
Windows
Http://dl.google.com/android/android-sdk
displayName: external input, such as: "Proteas-iPhone5s" between devices to exchange IDs need to be serialized, serialization method:-[MCPeerID serializedRepresentation] To sum up is: peerID = generate the first 9 bytes + displayName with The Decompilation Result Based on pid64:
void * -[MCPeerID initWithDisplayName:](void * self, void * _cmd, void * arg2) { STK33 = r5; STK35 = r7; sp = sp - 0x28; r5
. And set the kernel code entry address zrealaddr.
. Text
ADR r0, lc0
Ldmia r0, {R1, R2, R3, R4, R5, R6, IP, SP}
. Type lc0, # object
Lc0:. Word lc0 @ r1
. Word _ bss_start @ r2
. Word _ end @ r3
. Word zreladdr @ r4
. Word _ start @ R5
. Word _ got_start @ R6
. Word _ got_end @ IP
. Word user_stack + 4096 @ sp
The above code gets the entry address of the kernel code, which is saved in R4.
/*
* Check to s
How many registers does the ARM processor contain? What registers are available in each mode? What are the functions of these registers? Let's learn about arm registers with these questions! I believe you will gain some benefits after reading this article.The ARM processor has 37 registers.It contains 31 General registers and 6 State registers.
========================================================== ========================================================== ========USR System Supervisor abort
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/77/A8/wKioL1ZqrkujOgEPAACGyTYrjpU740.png "title=" QQ picture 20151211190632.png "alt=" Wkiol1zqrkujogepaacgytyrjpu740.png "/>One, address description1,R1--R5 all want a loopback0=10.10.x.x2, R1--R3 E0 address =1.1.123.x3, the R2--r4 WAN interface is 1.1.234.X/244,r4-r5 WAN Interface =1.1.45.x/24Two, bridgingConfiguring the R1-R3 Ethernet AddressConf
Os_schednew directly, because at this time the system is no task in the execution, there is no interruption lock, so it is important to note that before the system starts, it is best to leave only the system interruption, start and then open the interrupt, otherwise it may cause problemsThen still get the priority, get the TCB, and finally call the Osstarthighrdy function according to the current highest priority task, the function is a function that requires assembly language porting, in Os_cp
everyone know more knowledge, would rather more detours, go many ways out. And the above way every time add-p more trouble, I would like to use another way to solve the problem at once, and I would like to be familiar with IDA in the process of use, using Ida to open the Android_server file, in fact, he is elf format, open stress-free, open after use shift+12 View the string content interface:Finding these three key string contents, we can detect the following message after running past Android
enter gcc–version,g++--version,make–version,gdb–version for testing, and if you print out the version information and some descriptive information, the Cygwin installation is successful!3. Configure NDK Environment variablesAFirst find the Cygwin installation directory, find a home\b Open a. bash_profile file, add ndk=/cygdrive/Ndk=/cygdrive/e/android-ndk-r5Export NDKThe NDK name is random, for the convenience of later use, choose a short name, and then saveC Open Cygwin, enter the CD $NDK, and
-inux-objdump–d u-boot > Dump_u-boot.txt Copy Code
can get dump_u-boot.txt files. The file is the executable assembly code that contains the program in U-boot,
In which we can see the C language function source code, in the end corresponds to those assembly code.
The following is a two-function assembly code,
One is Clock_init,
The other is in the same C-source file as Clock_init, and another function Copycode2ram:
33D0091C 33d0091c:e92d4070 Push {r4, R5
Clock_init and the other is a function copycode2ram with clock_init in the same C source file:
33d0091c:copycode2ram:
33d0091c:e92d4070 push {r4, R5, R6, LR}
33d00920:e1a06000 mov r6, r0
33d00924:e1a05001 mov R5, R1
33d00928:e1a04002 mov r4, r2
33d0092c:ebffffef BL 33d008f0 b bootfrmnorflash ...
33d00984:ebffff14 bl 33d005dc nand_read_ll ...
33d009a8:e3a00000 mov r0, #0; 0x0
33d009ac:e8bd8070 P
calls" related, APCs will have detailed agreement. Interested in their own to study. )
But if there are too many parameters and the registers are not enough, then you have to put the extra parameters in the stack.
That is, you can use the stack to pass all the extra arguments that are not in place for the registers.3. An example of how the C language function call uses the stack
The function of the stack for the above explanation is somewhat abstract, and here's an example to explain it easily:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.