assembler linker and spim
play

Assembler, Linker, and SPIM October 10, 2008 () Assembler, Linker, - PowerPoint PPT Presentation

Assembler, Linker, and SPIM October 10, 2008 () Assembler, Linker, and SPIM October 10, 2008 1 / 6 Pseudo-instructions Instructions for assembler, not implemented by hardware mov is a modified add blt = slt + bne () Assembler, Linker, and


  1. Assembler, Linker, and SPIM October 10, 2008 () Assembler, Linker, and SPIM October 10, 2008 1 / 6

  2. Pseudo-instructions Instructions for assembler, not implemented by hardware mov is a modified add blt = slt + bne () Assembler, Linker, and SPIM October 10, 2008 2 / 6

  3. Linkers Need and Purpose of a Linker Separate compilation results in separate object files Linking: combine separate object modules into an executable Resolves external references in all modules () Assembler, Linker, and SPIM October 10, 2008 3 / 6

  4. Linkers Tasks of a Linker Resolves external references among modules Searches libraries for required procedures Determines memory location for each module and relocates absolute references Figure: What Linker does () Assembler, Linker, and SPIM October 10, 2008 4 / 6

  5. Linkers Loading Read executable’s header for size of (global) data & header sections Creates space in memory for them Copies instructions in data to memory Copies arguments to main() onto stack Initializes (clears) registers, including SP . Jumps to a procedure that copies arguments from stack to $a0 - $a3 calls main() procedure () Assembler, Linker, and SPIM October 10, 2008 5 / 6

  6. Binary and Text Files What is the difference All files are binary at storage level Binary file’s content is analyzed in many different ways Plain text files are a subset .txt or ASCII all source code files Text files are read 8 (rather 7) bits at a time Each byte is an ASCII code () Assembler, Linker, and SPIM October 10, 2008 6 / 6

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend