Tag:Symbol
-
Playing with __ attributes__ (III)
visibility __attribute__((visibility(“visibility_type”)))When we don’t want to expose a method, we usually use itstaticKeyword to decorate the function. In this way, the method will not be output to the symbol table at compile time. See this article for detailsBowen Llvm and GCC actually provide similar servicesattribute Use example: __attribute__((visibility(“default”))) void foo1(int x, int y); __attribute__((visibility(“hidden”))) int […]
-
Strve. JS, a JS library that can convert strings into views
preface I haven’t written original for a long time. Today I’ll send an article about my own JS Library – strve JS article. Finally, I experienced the fun of writing JS libraries or frameworks, documents and tools by myself. If you want to know about strve JS, you can start according to the document. Official […]
-
C serial 21 printf with return value, print long string and scanf
1、 Printf() return value Printf() function has a return value, which usually returns the number of printed characters. If there is an output error, printf() returns a negative value (different versions will have different values) #include int D21_1_prntval(void) { int bph2o = 212; int rv; rv = printf(“%d F is water’s boiling point.\n”, bph2o); printf(“The […]
-
14 hook principle (I) fishhook
preface This article begins to share with youHook (hook)The principle of, including the native of IOS systemMethod Swizzle, there is also a well-known hook third-party framework, such asfishHook、Cydia Substrateas well asinlineHookWait, and then I’ll focus on itfishHookI hope you can follow the actual operation again. 1、 Hook overview HookChinese Translationa hookorhook。 stayIOS reverseMiddle refers toChange […]
-
Problem solving 5 C + + interview questions phase I (including problem solving ideas, answer analysis and implementation code)
This article presents five C / C + + interview questions, with answers, problem-solving ideas and expanded knowledge. 1. Find the return value of the following function #include <stdio.h> int func(int x) { int iCnt = 0; while(x) { iCnt++; x = x&(x-1); } return iCnt; } int main() { printf(“cnt = %d\n”, func(9999)); return […]
-
Why do computers use complement codes to store data? Because its love will disappear~
✍ original code I believe many people have learned many ways to convert a decimal number into a binary number in junior high school. For example, we can quickly know that the binary of 10 can be expressed as 1010. But what the junior middle school teacher didn’t tell us is: – 10 how to […]
-
Sass operation
In this section, we learn about the operations in sass, which are supported in general programming syntax. Sass can also do various mathematical operations, including the most basic addition, subtraction, multiplication and division, variable operation, color operation, character operation, etc. In this section, we mainly talk about the most basic mathematical operations in sass. Addition […]
-
A little content of preventing SQL injection in mybatis
Some procedures related to preventing SQL injection:1. Mybatis parses # — > 2 in the SQL file, interacts with the database during JDBC precompiling — > 3, and interacts with the database when JDBC sets the value 1、 Mybatis parses # symbols into placeholders’? ‘ First look at the $symbol: public String handleToken(String content) { […]
-
IOS startup optimization – pile insertion during compilation
Start optimization – Theory Start optimization – binary rearrangement Start optimization – pile insertion during compilation Start optimization – generate order file concept Compiler instrumentation is to modify existing code or generate new code during code compilation.At compile time, add hook code to the binary source data inside each function to achieve the global hook […]
-
Use predicates (nspredicate) to improve the efficiency of collection traversal and filter lookup
preface In development, we often encounter some needs. Let’s find a value from the collection, filter the desired content from the collection, and so on. Therefore, we needergodicSet, add conditional judgment, and then obtain the qualified value. And aboutTraversal of setsIt is something that all software developers often deal with. Narrow the scope to IOS […]
-
IOS Compilation Principle
Hook changes the execution flow of the function. 1. Redirection: ASLR (random value) + offset value = memory value 0x5FCC + 0x0000000102edc000 = 0x102ee1fccAn executable file in memory is called a mirror viewdidload 0x102ee1fcc Executable file 0x0000000102edc000 0x5FCC Redirection: find the internal function address by calculationAssembly instruction and binary are in one-to-one correspondence. For example, […]