Dynamic linker speed and correctness
Feb 14, 2020
33 minute read

In the last article, we managed to load a program (hello-dl) that uses a single dynamic library (libmsg.so) containing a single exported symbol, msg.

Our program, hello-dl.asm, looked like this:

        global _start
        extern msg

        section .text

        mov rdi, 1      ; stdout fd
        mov rsi, msg
        mov rdx, 38     ; 37 chars + newline
        mov rax, 1      ; write syscall

        xor rdi, rdi    ; return code 0
        mov rax, 60     ; exit syscall

And our library, msg.asm, looked like this:

Want to read more?

This post is Patreon-exclusive until March 1, 2020

Become a Patron! 2020-03-01T07:30:00.000Z 2020-03-01T07:30:00.000Z UTC 📖 Dynamic linker speed and correctness Now available: https://fasterthanli.me/blog/2020/dynamic-linker-speed-and-correctness/ Log in

Become a Patron now to get early access to all my posts. Learn more