Linux Executable Symbol Relocation Explained

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ธ.ค. 2024

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

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

    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.

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

    Which book are you referring for all these quality videos?

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

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

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

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

  • @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 3 หลายเดือนก่อน

      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).

  • @terrym2007
    @terrym2007 28 วันที่ผ่านมา

    What gcc version do you use?

  • @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

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

    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.

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

    Thanks!!! This video helps a lot!👍

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

    Thank you!

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

    Thanks, this helped!

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

    Which IDE is this?