Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Which of the following are the principle task... Start Learning for Free
Which of the following are the principle tasks of the linker?
  1. Resolve external references among separately compiled program units.
  2. Translate assembly language to machine code.
  3. Relocate code and data relative to the beginning of the program.
  4. Enforce access-control restrictions on system libraries.
  • a)
    1 and 2
  • b)
    1 and 3
  • c)
    2 and 3
  • d)
    1 and 4
Correct answer is option 'B'. Can you explain this answer?
Most Upvoted Answer
Which of the following are the principle tasks of the linker? Resolve ...
Principle tasks of the linker are as follows.
1. Resolve external references among separately compiled program units.
2. Relocate code and data relative to the beginning of the program.
 Assembler translates assembly language to machine code.
 Loader enforces access-control restrictions on system libraries.
So, option (2) is correct.
Free Test
Community Answer
Which of the following are the principle tasks of the linker? Resolve ...
The linker is an important component of the software development process that performs several key tasks to generate executable files from object files. The principle tasks of the linker include:

1. Resolve external references among separately compiled program units:
When a program is written in multiple source files, each file is compiled separately into object files. These object files may contain references to functions or variables defined in other object files. The linker resolves these external references by connecting the references to their corresponding definitions. This allows the program to be executed seamlessly.

2. Relocate code and data relative to the beginning of the program:
When object files are created, the code and data within them are typically not located at fixed addresses. The linker is responsible for determining the final addresses of code and data sections and updating the object files accordingly. This process is known as relocation. The linker adjusts the references to symbols within the program based on the final addresses, ensuring that the program can be executed correctly.

3. Enforce access-control restrictions on system libraries:
System libraries contain pre-compiled code and data that can be used by programs. However, not all functions or variables in system libraries may be accessible to all programs. The linker enforces access-control restrictions by checking whether the program has the necessary permissions to access specific symbols in the system libraries. This helps maintain the security and integrity of the system.

Therefore, the correct answer is option B: 1 and 3. The linker's main tasks involve resolving external references among separately compiled program units and relocating code and data relative to the beginning of the program. The translation of assembly language to machine code is typically performed by the assembler, not the linker. Enforcing access-control restrictions on system libraries is also not a primary task of the linker but rather a responsibility of the operating system or other security mechanisms.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Which of the following are the principle tasks of the linker? Resolve external references among separately compiled program units. Translate assembly language to machine code. Relocate code and data relative to the beginning of the program. Enforce access-control restrictions on system libraries.a)1 and 2b)1 and 3c)2 and 3d)1 and 4Correct answer is option 'B'. Can you explain this answer?
Question Description
Which of the following are the principle tasks of the linker? Resolve external references among separately compiled program units. Translate assembly language to machine code. Relocate code and data relative to the beginning of the program. Enforce access-control restrictions on system libraries.a)1 and 2b)1 and 3c)2 and 3d)1 and 4Correct answer is option 'B'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Which of the following are the principle tasks of the linker? Resolve external references among separately compiled program units. Translate assembly language to machine code. Relocate code and data relative to the beginning of the program. Enforce access-control restrictions on system libraries.a)1 and 2b)1 and 3c)2 and 3d)1 and 4Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Which of the following are the principle tasks of the linker? Resolve external references among separately compiled program units. Translate assembly language to machine code. Relocate code and data relative to the beginning of the program. Enforce access-control restrictions on system libraries.a)1 and 2b)1 and 3c)2 and 3d)1 and 4Correct answer is option 'B'. Can you explain this answer?.
Solutions for Which of the following are the principle tasks of the linker? Resolve external references among separately compiled program units. Translate assembly language to machine code. Relocate code and data relative to the beginning of the program. Enforce access-control restrictions on system libraries.a)1 and 2b)1 and 3c)2 and 3d)1 and 4Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Which of the following are the principle tasks of the linker? Resolve external references among separately compiled program units. Translate assembly language to machine code. Relocate code and data relative to the beginning of the program. Enforce access-control restrictions on system libraries.a)1 and 2b)1 and 3c)2 and 3d)1 and 4Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Which of the following are the principle tasks of the linker? Resolve external references among separately compiled program units. Translate assembly language to machine code. Relocate code and data relative to the beginning of the program. Enforce access-control restrictions on system libraries.a)1 and 2b)1 and 3c)2 and 3d)1 and 4Correct answer is option 'B'. Can you explain this answer?, a detailed solution for Which of the following are the principle tasks of the linker? Resolve external references among separately compiled program units. Translate assembly language to machine code. Relocate code and data relative to the beginning of the program. Enforce access-control restrictions on system libraries.a)1 and 2b)1 and 3c)2 and 3d)1 and 4Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of Which of the following are the principle tasks of the linker? Resolve external references among separately compiled program units. Translate assembly language to machine code. Relocate code and data relative to the beginning of the program. Enforce access-control restrictions on system libraries.a)1 and 2b)1 and 3c)2 and 3d)1 and 4Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Which of the following are the principle tasks of the linker? Resolve external references among separately compiled program units. Translate assembly language to machine code. Relocate code and data relative to the beginning of the program. Enforce access-control restrictions on system libraries.a)1 and 2b)1 and 3c)2 and 3d)1 and 4Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev