-2018-2019-1 20165206 "Information Security system Design Fundamentals" 3rd week Study summary-Textbook learning content Summary
Program code: The GCC command invokes a complete set of programs to convert the source code into an executable file.
First, the C preprocessor expands the source code;
Second, the compiler produces the source file assembly code;
The assembler then converts the assembly code into a binary target code file;
Finally, the linker merges the target code file with the code that implements the library function, producing the executable code file.
Two abstractions for machine-level encoding:
The first is ISA, the instruction set architecture or instruction set architecture, which defines the processor state, the format of the instruction, and the effect of each instruction on the state.
The second is that the memory address used by the machine-level program is the virtual address.
Assembly and Disassembly:
To view the C language compiler's instructions for generating assembly code:
gcc -Og -S main.c
The instructions that GCC compiles and assembles:
gcc -Og -c main.c
Disassembly Instructions:
objdup -d main.o
Example:
Source:
Assembly:
Disassembly:
The three types of operands:
The first is an immediate number, which is used to denote a constant value.
The second is a register that represents the contents of a register.
The third is a memory reference that accesses a memory location based on a valid address.
Valid Address Calculation formula:
An immediate number offset IMM, a base address register RB, a variable address register RI, a scale factor s, valid addresses are computed as: Imm + R[RB] + r[ri]*s
Data transfer Instructions
-Last week's summary of the wrong quiz
Error One: Word length 32-bit machine, virtual address space range is (0-2^32-1).
The wrong Title II: a=[0010], b=[1100], a| | The value of B is (not 0 (TRUE)).
2018-2019-1 20165206 "Information Security system Design Fundamentals" 3rd Week Study Summary