[問題] linux 下 c/c++ libc.so ld.so
linux 下 c/c++ 的程式
就算只有
int main()
{
return 0;
}
在他的記憶體裡面都會有多 libc-xxx.so, ld-xxx.so
這兩個 .so 在一個linux process 下的作用是?
謝謝
--
The Beginning is the end
The End is the beginning
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.147.15.66
→
09/09 15:17, , 1F
09/09 15:17, 1F
推
09/09 15:21, , 2F
09/09 15:21, 2F
→
09/09 15:22, , 3F
09/09 15:22, 3F
→
09/09 15:22, , 4F
09/09 15:22, 4F
→
09/09 15:23, , 5F
09/09 15:23, 5F
→
09/09 15:23, , 6F
09/09 15:23, 6F
→
09/09 15:25, , 7F
09/09 15:25, 7F
→
09/09 15:38, , 8F
09/09 15:38, 8F
→
09/09 15:39, , 9F
09/09 15:39, 9F
→
09/09 15:40, , 10F
09/09 15:40, 10F
在wiki找到的, C standard library:
The run-time support provides not only the C standard library functions,
but possibly other material needed to create an environment for the C
program, such as initialization prior to the invocation of the main
function, or subroutines to provide arithmetic operations missing from the CPU that are
needed by code generated by the C compiler.
所以這段話的意思是,
process在進入main前, 會有一些動作需要由libc來處理嗎?
→
09/09 15:49, , 11F
09/09 15:49, 11F
※ 編輯: powertodream 來自: 122.147.15.66 (09/09 15:58)
→
09/09 16:05, , 12F
09/09 16:05, 12F
推
09/09 16:55, , 13F
09/09 16:55, 13F
→
09/09 16:55, , 14F
09/09 16:55, 14F
推
09/09 17:03, , 15F
09/09 17:03, 15F
→
09/09 17:03, , 16F
09/09 17:03, 16F
→
09/09 17:03, , 17F
09/09 17:03, 17F
→
09/09 17:04, , 18F
09/09 17:04, 18F
→
09/09 18:09, , 19F
09/09 18:09, 19F