Why does an assembly program only work when linked with crt1.o crti.o and crtn.o?
问题 I like to know how programs work so to make it as bare bones as possible I fool around with assembly. I just found out how to assemble code for x86_64 using wprintf function (found out wide chars are 32 bit). all I had to do was link to libc (-lc). I'm trying to assemble code for 32-bit doing about the same thing but I stumbled quite a bit. Eventually I used gcc to do the linking ( and changed the _start: to main:). So then I did the linking myself using ld and included crt1.o crti.o and crtn