고졸백수해킹일기

undefined reference to 'pthread_~' 해결 본문

CVE-Exploits

undefined reference to 'pthread_~' 해결

ExploitSori 2020. 10. 24. 16:00

sori@ubuntu:~/edb$ arm-linux-gnueabi-gcc -o cow dirtyc0w.c 
/tmp/ccGmQHPl.o: In function `main':
dirtyc0w.c:(.text+0x25c): undefined reference to `pthread_create'
dirtyc0w.c:(.text+0x278): undefined reference to `pthread_create'
dirtyc0w.c:(.text+0x288): undefined reference to `pthread_join'
dirtyc0w.c:(.text+0x298): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status

 

arm 환경에서 dirtycow를 할 일이 있어서.. 해 보았는데, 빌드가 안될때  -pthread 를 붙이면 된단다.

 

 arm-linux-gnueabi-gcc -o c0w dirtyc0w.c -pthread

해결!

 

reference. stackoverflow.com/questions/1662909/undefined-reference-to-pthread-create-in-linux

'CVE-Exploits' 카테고리의 다른 글

windows usb exploit  (0) 2020.10.08
[Andriod] blueborne  (0) 2018.03.07
[kernel] Drityc0w  (0) 2018.01.17
[ARM] Meltdown  (0) 2018.01.17