학습 주제
Object File의 3가지 종류와 여러 system에 따른 Object file format에 대해 학습했다.
정리한 내용
7.3 Object Files(목적 파일)
위에서 언급되왔던 object file에 대해서 알아볼 것이다.
세가지 형식의 object files
- Relocatable object file
- binary code와 data를 포함
- executable object file을 생성하기 위해, compile time때 다른 relocatable object file과 결합될 수 있는 형식이다.
- Executable object file
- binary code와 data를 포함
- memory에 바로 복사될 수 있다.
- 실행 가능하다.
- shared object file
- relocatable object file 중 특별한 type이다.
- load time이나 run time 때, 동적으로 memory에 load되거나 link될 수 있다.
Object module V.S. Object file
object module : byte-sequence를 말한다.
object file : object module이 file로 저장된 것을 말한다(disk에 저장)
여기서는 이 두개를 번갈아가며 같은 의미로 사용하려 한다.
Object File Formats 종류
- Unix system(from Bell Labs) : a.out format
- 현재 실행 가능한 file을 a.out file로 참고되기도 한다.(gcc의 default program 이름)
- Window : Portable Executable(PE) format
- Mac OS-X : Mach-O format
- Modern x86-64 Linux & Unix system : Executable and Linkable Format(ELF)
개요에서 언급했다시피, 앞으로의 설명은 이 ELF로 설명할 것이다.
'Computer Science > 컴퓨터 구조' 카테고리의 다른 글
[CSAPP] 7.5 Symbols and Symbol Tables(심볼과 심볼테이블) (0) | 2023.02.15 |
---|---|
[CSAPP] 7.4 Relocatable Object Files(재배치 가능 목적 파일) (0) | 2023.02.15 |
[CSAPP] 7.2 Static Linking(정적연결) (0) | 2023.02.15 |
[CSAPP] 7.1 Compiler Drivers(컴파일러 드라이버) (0) | 2023.02.15 |
[CSAPP] 6.6 Putting It Together: The Impact of Caches on Program Performance(프로그램 성능에 대한 캐시의 영향) (0) | 2023.02.15 |