Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Why do pointers require fix-ups? Create pointers to each of the data elements in

ID: 3818518 • Letter: W

Question

Why do pointers require fix-ups? Create pointers to each of the data elements in the following code. In the following example, assume that the data section has been relocated to 0x32000, and complete the fix-up required by the following relocation record. If a pointer points to a short data item with the label COUNT, provide code to dereference the pointer. Create a pointer to the following data instance. Create a pointer to the following data instance. If a pointer referenced by the label HEXTAB points to a byte of data, provide code to dereference the pointer. What is an array?

Explanation / Answer

Relocation is that the method of assignment load addresses to position-dependent code of a program and adjusting the code and information within the program to replicate the appointed addresses.A linker typically performs relocation in conjunction with image resolution, the method of looking out files and libraries to exchange symbolic references or names of libraries with actual usable addresses in memory before running a program.
Fix up’s:
The relocation table may be a list of pointers created by the compiler or computer program and keep within the object or feasible file. every entry within the table, or "fixup", may be a pointer to associate absolute address within the computer code that has to be modified once the loader relocates the program so it'll visit the proper location. Fixups area unit designed to support relocation of the program as an entire unit. In some cases, every fixup within the table is itself relative to a base address of zero, therefore the fixups themselves should be modified because the loader moves through the table.
In some architectures a fixup that crosses sure boundaries or that's not aligned on a word boundary is illegitimate and flagged as a mistake by the linker

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote