본문 바로가기

C++에서 문자열 EOF까지 입력받고 출력하기 123456789101112#include #include #include int main(void){ std::istreambuf_iterator begin(std::cin), end; std::string s(begin, end); std::cout 더보기
Linux kernel debugging with qemu x86-64 리눅스 커널을 디버깅 하는 방법입니다.커널을 디버깅하기 위해 host-machine, target-machine이 필요한데 host-machine은 우분투 x86-64라고 가정하고 target-machine은 커널을 qemu에 올려서 vm으로 진행하겠습니다.먼저 디버깅할 버전의 커널을 컴파일 해야합니다.커널을 다운로드 받고 (http://kernel.org) 압축을 풀어서 커널 디렉토리로 이동한 후make defconfig make kvmconfig make menuconfig를 순서대로 실행해줍니다.make menuconfig를 하면 옵션을 선택할 수 있는 창들이 뜰 텐데 여기서 Kernel Hacking compile-time checks and compiler options compil.. 더보기
커널 컴파일 시 code model kernel does not support PIC mode 해결법 낮은 버전의 커널을 최신 혹은 높은 버전의 gcc로 컴파일 할 때 cc1: error: code model kernel does not support PIC mode 라는 에러를 볼 수 있다. gcc특정 버전 이상에서는 pie적용이 기본으로 설정되어있어서 나는 오류이다.1234567891011121314151617diff --git a/Makefile b/Makefileindex dda982c..f96b174 100644--- a/Makefile+++ b/Makefile@@ -608,6 +608,12 @@ endif # $(dot-config) # Defaults to vmlinux, but the arch makefile usually adds further targets all: vmlinux +# .. 더보기