Notice
Recent Posts
Recent Comments
Link
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Tags more
Archives
Today
Total
관리 메뉴

난 정말 최고야 멋있어

[gnu] __attribute__((constructor)) 의 의미 본문

카테고리 없음

[gnu] __attribute__((constructor)) 의 의미

n00bh4cker 2020. 4. 29. 14:37

https://stackoverflow.com/questions/2053029/how-exactly-does-attribute-constructor-work

 

How exactly does __attribute__((constructor)) work?

It seems pretty clear that it is supposed to set things up. When exactly does it run? Why are there two parentheses? Is __attribute__ a function? A macro? Syntax? Does this work in C? C++? Does the

stackoverflow.com

 

__attribute__((costructor)) 는 gcc 전용 함수 특성으로 

공유 라이브러리가 로드될때 호출되는 함수라는것을 명시해준다 (일반적으로 프로그램 시작시 호출된다고 보면 됨)