How do linkers resolve symbols? Systems Programming CS Lecture

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Bro just dropped the coldest systems lecture and thought we wouldn't notice🥶🥶

atharvbhagya
Автор

Great explanation Chris. Keep uploading.

askinc
Автор

Well, lot's of stuff has just begun to make sense to me. Huge appreciation!

Nikage
Автор

Hello, is this playlist the whole course ? if not, can you upload all of them ?

NinjaAcademie
Автор

@Chris Kanich - Thank you and very nice explanation. I am embedded professional who wants to brush some of the basics. I want to clarify or actually correct by saying that at 6:08 time the .text section contains the machine code and not the assembly instruction. There is subtle difference between assembly instruction and machine code. Assembly instructions are mnemonics, that is still human readable and machine code is translation assembly instruction that is in the format which is only understood by target processor. Does that make sense? Hope this clarification helps others too.

jankeshchakravarthy
Автор

For anyone hit a compilation error of multiple definition of `x', one can set "-std=c99" to use c99 and "-fcommon" to force placing uninitialized global variables in a common block.

psegzud
Автор

thanks for these lectures. they are great!

one question, what font are u using in vscode? it looks really clean!

pitankar
Автор

Regarding the last comment about putting libs at the end, I can see that as being for improving compile speed. Nowadays we have faster computers, but there are still some code that takes long to compile, like the linux kernel.

DF-ssep
Автор

Another way to fix compilation error of multiple definition of `x', one can add `extern` to `int x` in weaklibrary.c. e.g., `extern int x`.

psegzud
Автор

Very good explanation why we need make all variable inside your source file as static.

MrZamuhrishka
Автор

What book are you using for this course? Thanks.

haoming
Автор

I think the linker throws an error for multiple definititions of x now, because I tried it with gcc 12.2.0 and GNU Binutils 2.39.0. :(

georgemaratos
Автор

This is not what rvalue/lvalue mean in c/c++.

abuyoyo
Автор

How did you run the final line error freely?

This line gives me error.
gcc -g -fno-pie -no-pie -o weaksymbols weakmain.o weaklibrary.o

/usr/bin/ld: multiple definition of `x'; first defined here
collect2: error: ld returned 1 exit status

zeshanahmednabin