.a 파일을 만들 때 보통 ar을 이용해 만든 뒤 ranlib을 이용한다.
ar뒤의 파일 format은 정말 별 거 없다. 그냥 파일들과 그 속성들을 뭉쳐놓은 것이다. global header는 signature가 전부고.. 파일별 header 역시 크기/access control/timestamp 등만을 가지고 있다.
ranlib은 여기에 object 파일들에 대한 symbol table을 더하는거다. "무슨 파일이 어디있냐?" 같은 질문에 대한 대답을 빨리 찾고 싶을 때 쓸만한 index를 만든다고 하면 되겠다.
ranlib은 random library의 준말이다. archive를 random access가 가능하게 해주고 싶은 마음을 잘 드러내주고 있다.
Tuesday, August 2, 2011
Saturday, March 26, 2011
linux kernel debugging with gdb: show me the current task
The problem of getting the current task bothered me for a while when debugging with gdb.
define show_current
set $thread_info = ((int)$sp) &0xffffe000
set $current_task = (((struct thread_info *)($thread_info))->task)
printf "current = %08x\n", (int)$current_task
printf "current pid = %d\n", (int)($current_task->pid)
printf "current mm = %08x\n", (int)($current_task->mm)
end
define show_current
set $thread_info = ((int)$sp) &0xffffe000
set $current_task = (((struct thread_info *)($thread_info))->task)
printf "current = %08x\n", (int)$current_task
printf "current pid = %d\n", (int)($current_task->pid)
printf "current mm = %08x\n", (int)($current_task->mm)
end
Thursday, March 3, 2011
thunderbird segmentation fault
최근 thunderbird가 ubuntu 에서 실행시 segfault로 죽는 경우가 있다.
https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/526667
에따르면
sudo apt-get install nscd
가 이걸 해결한단다.
https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/526667
에따르면
sudo apt-get install nscd
가 이걸 해결한단다.
Subscribe to:
Comments (Atom)