I'm glad to tell you something about Part 28
Hi, doctor:
I'm not sure if you're still following this repo, but I sincerely want to give you some response.
in Part-28, you mentioned that:
One annoyance is that I'm still calling the external C compiler cc to do the linking. ... I assume that it should be possible to do a similar command on current Linux, but so far my Google-fu isn't enough to work this out. If you read this and know the answer, let me know!
Now I know how to link without using gcc:
Assuming we have a obj file named out.o, we can execute the following command to generate an executable file:
$ ld -o out out.o /lib/x86_64-linux-gnu/crt1.o -lc -dynamic-linker /lib64/ld-linux-x86-64.so.2crt1.ois a starter which calls main-lclinklibcor other libs if we needld-linux-x86-64.so.2helps to load dynamic libs
If
ld-linux-x86-64.so.2orcrt1.ois not found, you may find them bylocateor any other command.
I don't know if additional parameters will be needed in the future, but they do work for now.
If you see this message, please tell me it works.
Thanks :)
Source: DoctorWkt/acwj