comp229-slide-3 - Concordia university Department of...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Lesson 3 - Loaders and linkers 1 Concordia university Department of computer science System software – COMP229 Lesson 3 : Loaders and linkers © Author : Kerly Titus
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lesson 3 - Loaders and linkers 2 Loaders and linkers Contents 1. Principles of loaders and linkers 3 2. Machine-dependent features of loaders and linkers 11 3. Machine-independent features of loaders and linkers 36 4. Design options of loaders and linkers 41 5. Key points 46 6. References 48
Background image of page 2
Lesson 3 - Loaders and linkers 3 1. Principles of loaders and linkers Introduction The SIC absolute loader A SIC/XE bootstrap loader
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lesson 3 - Loaders and linkers 4 Principles of loaders and linkers Introduction Main functions of a linker. – Combination of object modules into a single executable module. – Resolution of the external references between linked object modules. – Relocation of the memory operand references relatively to the base address of each object module. Main functions of a loader. – Loading of an executable module in primary memory. – Relocation of the addresses of the instructions and data. Types of linkers. – Linking loader or linkage editor. Types of loaders. – Absolute or relative (relocating) loader.
Background image of page 4
Lesson 3 - Loaders and linkers 5 Principles of loaders and linkers The SIC absolute loader • Functions of the SIC absolute loader. – Validation of the header record. • Check of the consistency of the program name. • Verification of memory availability. – Processing of the text records. • The object program is loaded in specific memory addresses. • The pairs of hexadecimal digits are packed in a single byte during the loading operation. – Program execution. • The end record specifies the entry point of the program.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lesson 3 - Loaders and linkers 6 Principles of loaders and linkers The SIC absolute loader H|COPY |001000|00107A T|001000|1E|141033|482039|001036|281030|301015|482061|3C1003|00102A|0C1039|00102D T|00101E|15|0C1036|482061|081033|4C0000|454F46|000003|000000 T|002039|1E|041030|001030|E0205D|30203F|D8205D|281030|302057|549039|2C205E|38203F T|002057|1C|101036|4C0000|F1|001000|041030|E02079|302064|509039|DC2079|2C1036 T|002073|07|382064|4C0000|05 E|001000 • An example of an absolute object program
Background image of page 6
Lesson 3 - Loaders and linkers 7 Principles of loaders and linkers The SIC absolute loader Address Content 0000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0010 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0FF0 1000 14103348 20390010 36281030 30101548 1010 20613C10 0300102A 0C103900 102D0C10 1020 36482061 0810334C 0000454F 46000003 1030 000000 - - - - - - - - - - - - - - - - - - - - - - - - - - 2030 - - - - - - - - - - - - - - - - - - 041030 001030E0 2040 205D3020 3F28205D 28103030 20575490 2050 392C205E 38203F10 10364C00 00F10010 2060 00041030 E0207930 20645090 39DC2079 2070 2C103638 20644C00 0005 - - - - - - - - - - - - 2080 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - • An example of an absolute memory image
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lesson 3 - Loaders and linkers 8 Principles of loaders and linkers The SIC absolute loader main( ) { read(header_record); validate(program_name, program_length); read(text_record); while (record_type ‘E’) if (test_format(object_code, character_format)) convert_to_binary(object_code); load(address, object_code); increment(address); read(text_record); } program_counter start_address; • Algorithm for the SIC absolute loader
Background image of page 8
Lesson 3 - Loaders and linkers 9 Principles of loaders and linkers A SIC/XE bootstrap loader Principles of a bootstrap loader.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 48

comp229-slide-3 - Concordia university Department of...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online