Linux Executable Symbol Relocation Explained

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ก.ย. 2024

ความคิดเห็น • 13

  • @MartinCharles
    @MartinCharles ปีที่แล้ว +5

    The answer to the last question: addends are to reduce the size of the symbol table. Instead of having one entry for every array + offset, in the symbol table, many entries in the relocation table can reference a single value in the symbol table with different addends. It is about putting related data close to where it starts to become specialized rather than having a generalized but bloated storage layout.

  • @zeshanahmednabin
    @zeshanahmednabin ปีที่แล้ว

    Your videos are really interesting. Thanks for making such good contents. Can you make your lecture slides public?

  • @trojanhorse8278
    @trojanhorse8278 7 หลายเดือนก่อน +3

    Which book are you referring for all these quality videos?

    • @adam29334
      @adam29334 2 หลายเดือนก่อน +1

      Computer Systems, a programmer’s perspective, by Randal E. Bryant and David R. O’Hallaron

  • @tommymairo8964
    @tommymairo8964 2 ปีที่แล้ว +1

    actually you can't, PICs are going to be dynamic mapped into different address trunks when loaded by kernel with ASLR enabled
    What the compiler could make sure is the offset of each resources/instructions to it's sections's base address. However, the base address is dynamic while executing

  • @ЛеонидПершин-б6ю
    @ЛеонидПершин-б6ю ปีที่แล้ว

    Thanks!!! This video helps a lot!👍

  • @flyxtop
    @flyxtop 3 ปีที่แล้ว

    Is the answer for the last question, because we can load the program anywhere on memory and execute? (to make it PIC, position independent code)? BTW, thanks for the good explanation. I couldn't understand it 100% but it gave me the essential things of what linker does.

  • @awesomedee5421
    @awesomedee5421 2 ปีที่แล้ว +2

    Can you talk about the physical and virtual addresses and how they are selected? Where does it come from?

    • @equeim
      @equeim 20 วันที่ผ่านมา

      If you mean memory addresses (pointers) then it is done by OS and processor. OS tells the CPU how virtual memory pages map to physical memory, and CPU does the translation at runtime. If program tries to use virtual address that haven't been mapped to physical memory (because program didn't malloc it) then CPU notifies the OS about it and OS kills the process (this is a common cause of segfaults).

  • @muhammadkamar3423
    @muhammadkamar3423 4 ปีที่แล้ว +1

    Thank you!

  • @hardikrajpal2410
    @hardikrajpal2410 ปีที่แล้ว

    Thanks, this helped!

  • @Vineeth_Shankar
    @Vineeth_Shankar 3 ปีที่แล้ว

    Which IDE is this?