Compiler tool chains are very necessary in the process of designing a new microprocessor, and assembler and linker are important parts of the compiler tool chains. The task of this project is to design and develop the assembler and linker for LX-1164 microprocessor.After analysis, the author selects the development scheme of porting, which is porting the GAS and GLD of GNU Binutils to support LX-1164 microprocessor.At first, this paper introduces the architecture of LX-1164 and ELF, and analyzes the principle of BFD and its symbol process. Then, it continues to analyze important data structures and respective running mechanisms of GAS and GLD. Finally, based on the architecture of LX-1164, it makes a detailed description of the steps of porting BFD, GAS and GLD. |