SlideShare ist ein Scribd-Unternehmen logo
1 von 8
ABI
Application Binary Interface
ABI란?
• 응용 프로그램과 운영체제, 응용 프로그램과 라이브러리 사이에
필요한 저 수준 인터페이스를 정의한다
응용 프로그램운영체제 라이브러리
ABI란?
• API랑 똑같은 거 아냐?
• 하지만 API보다 ABI가 저수준(binary)이라는 것
• API는 소스 코드에서 사용되고 ABI는 바이너리에서 호환이 된다
• 아키텍처와 운영체제마다 조금씩 차이가 있다
• 윈도 98에서 돌아가던 게 XP에서도 돌아가는 이유는 MS에서 ABI를 지
원하기 때문이다
• 함수 호출 규약을 정의한다
ABI란?
• 외부 라이브러리를 사용할 때 중요하다
• 만약 A라는 라이브러리를 사용하고 있을 때 업데이트된 A라이브
러리가 배포되었다.
• 외부 라이브러리가 업데이트 됐다고 전체 프로젝트를 다시 컴파일 하고
싶은가?
• 만약 업데이트된 라이브러리도 같은 ABI를 지원한다면 프로그램을 변경
하지 않아도 잘 돌아간다
• 서로 다른 버전의 두 라이브러리가 같은 ABI를 가지고 있을 때 “binary-
compatible”하다
• 같은 저수준 인터페이스를 가진다는 말
ABI가 바뀌면 컴파일 또 해야 된다
• 간혹 ABI 변경을 피할 수 없을 때도 있다
• 그럼 뭐 컴파일 다시 하는 거지…
• ABI는 바뀌었는데 API는 그대로인 경우도 있다
• 이걸 “source compatible”하다고 함
• 근데 이거만 가지고는 동작 보장이 안되기 때문에 ABI가 바뀌면 컴파일
을 다시 해야만 함
ABI를 변경하지 않으려면?
• 이런저런 이유로 ABI가 변경되지 않는 쪽이 바람직하다
• 함수 인터페이스를 바꾸면 안 된다
• 리턴 타입, 매개변수 숫자나 타입 등등
• 자료형 정의나 구조체 정의, 상수 정의 등도 바뀌면 안 된다
• 새 함수나 자료형이 추가되는 것은 가능하다
ABI는 어떻게 제공되는가?
• ABI는 명시적으로 제공될 필요가 없다
• 사람들이 어셈블리로 코딩한다면(!) 이야기가 달라지지만…
• ABI는 특정 언어에 의존적이지 않다.
• C언어랑 PASCAL 프로그램도 컴파일 되면 같은 ABI를 쓸 수 있다
결론
• ABI는 calling convention을 다룬다
• ABI 호환성을 유지하면 라이브러리 유지 / 보수가 편해진다
• ABI 호환성을 유지하려면 추가 외에 기존의 라이브러리 값을 함
부로 바꾸면 안 된다
• ABI 호환성이 깨졌을 경우는 re-compile하면 된다

Weitere ähnliche Inhalte

Was ist angesagt?

Php 2 - Approfondissement MySQL, PDO et MVC
Php 2 - Approfondissement MySQL, PDO et MVCPhp 2 - Approfondissement MySQL, PDO et MVC
Php 2 - Approfondissement MySQL, PDO et MVCPierre Faure
 
Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...Zhe Li
 
ORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate OverviewORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate OverviewBrett Meyer
 
A Brief Intro to Scala
A Brief Intro to ScalaA Brief Intro to Scala
A Brief Intro to ScalaTim Underwood
 
DevOps - Interview Question.pdf
DevOps - Interview Question.pdfDevOps - Interview Question.pdf
DevOps - Interview Question.pdfMinhTrnNht7
 
Client-side JavaScript
Client-side JavaScriptClient-side JavaScript
Client-side JavaScriptLilia Sfaxi
 
Dalvik仮想マシンのアーキテクチャ 改訂版
Dalvik仮想マシンのアーキテクチャ 改訂版Dalvik仮想マシンのアーキテクチャ 改訂版
Dalvik仮想マシンのアーキテクチャ 改訂版Takuya Matsunaga
 
Java Servlet
Java ServletJava Servlet
Java ServletYoga Raja
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design PatternsLilia Sfaxi
 
Thread Dump Analysis
Thread Dump AnalysisThread Dump Analysis
Thread Dump AnalysisDmitry Buzdin
 
Applet skelton58
Applet skelton58Applet skelton58
Applet skelton58myrajendra
 
Debugging Applications with GNU Debugger
Debugging Applications with GNU DebuggerDebugging Applications with GNU Debugger
Debugging Applications with GNU DebuggerPriyank Kapadia
 
Jdbc architecture and driver types ppt
Jdbc architecture and driver types pptJdbc architecture and driver types ppt
Jdbc architecture and driver types pptkamal kotecha
 

Was ist angesagt? (20)

Php 2 - Approfondissement MySQL, PDO et MVC
Php 2 - Approfondissement MySQL, PDO et MVCPhp 2 - Approfondissement MySQL, PDO et MVC
Php 2 - Approfondissement MySQL, PDO et MVC
 
Java programming -Object-Oriented Thinking- Inheritance
Java programming -Object-Oriented Thinking- InheritanceJava programming -Object-Oriented Thinking- Inheritance
Java programming -Object-Oriented Thinking- Inheritance
 
Support programmation orientée aspect mohamed youssfi (aop)
Support programmation orientée aspect mohamed youssfi (aop)Support programmation orientée aspect mohamed youssfi (aop)
Support programmation orientée aspect mohamed youssfi (aop)
 
Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...
 
ORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate OverviewORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate Overview
 
A Brief Intro to Scala
A Brief Intro to ScalaA Brief Intro to Scala
A Brief Intro to Scala
 
DevOps - Interview Question.pdf
DevOps - Interview Question.pdfDevOps - Interview Question.pdf
DevOps - Interview Question.pdf
 
Les collections en Java
Les collections en JavaLes collections en Java
Les collections en Java
 
Swoole w PHP. Czy to ma sens?
Swoole w PHP. Czy to ma sens?Swoole w PHP. Czy to ma sens?
Swoole w PHP. Czy to ma sens?
 
Client-side JavaScript
Client-side JavaScriptClient-side JavaScript
Client-side JavaScript
 
Dalvik仮想マシンのアーキテクチャ 改訂版
Dalvik仮想マシンのアーキテクチャ 改訂版Dalvik仮想マシンのアーキテクチャ 改訂版
Dalvik仮想マシンのアーキテクチャ 改訂版
 
Web services SOAP et REST
Web services  SOAP et RESTWeb services  SOAP et REST
Web services SOAP et REST
 
Java Servlet
Java ServletJava Servlet
Java Servlet
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
 
Thread Dump Analysis
Thread Dump AnalysisThread Dump Analysis
Thread Dump Analysis
 
Applet skelton58
Applet skelton58Applet skelton58
Applet skelton58
 
Gcc porting
Gcc portingGcc porting
Gcc porting
 
Debugging Applications with GNU Debugger
Debugging Applications with GNU DebuggerDebugging Applications with GNU Debugger
Debugging Applications with GNU Debugger
 
Jdbc architecture and driver types ppt
Jdbc architecture and driver types pptJdbc architecture and driver types ppt
Jdbc architecture and driver types ppt
 
Python - Lecture 1
Python - Lecture 1Python - Lecture 1
Python - Lecture 1
 

Andere mochten auch

C# 뉴비를 위한 맛보기
C# 뉴비를 위한 맛보기C# 뉴비를 위한 맛보기
C# 뉴비를 위한 맛보기진상 문
 
Intra process memory protection for applications on ARM and x86
Intra process memory protection for applications on ARM and x86Intra process memory protection for applications on ARM and x86
Intra process memory protection for applications on ARM and x86Priyanka Aash
 
家に帰るまでが遠足です
家に帰るまでが遠足です家に帰るまでが遠足です
家に帰るまでが遠足ですCryolite
 
C++が仲間になりたそうにこちらを見ている
C++が仲間になりたそうにこちらを見ているC++が仲間になりたそうにこちらを見ている
C++が仲間になりたそうにこちらを見ているfjnl
 
C++14 solve explicit_default_constructor
C++14 solve explicit_default_constructorC++14 solve explicit_default_constructor
C++14 solve explicit_default_constructorAkira Takahashi
 
Android HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacyAndroid HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacyJollen Chen
 
C# 뉴비를 위한 맛보기 2
C# 뉴비를 위한 맛보기 2C# 뉴비를 위한 맛보기 2
C# 뉴비를 위한 맛보기 2진상 문
 
SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]Takuya ASADA
 
OpenBSD/sgi SMP implementation for Origin 350
OpenBSD/sgi SMP implementation for Origin 350OpenBSD/sgi SMP implementation for Origin 350
OpenBSD/sgi SMP implementation for Origin 350Takuya ASADA
 

Andere mochten auch (11)

C# 뉴비를 위한 맛보기
C# 뉴비를 위한 맛보기C# 뉴비를 위한 맛보기
C# 뉴비를 위한 맛보기
 
Operating system
Operating systemOperating system
Operating system
 
Intra process memory protection for applications on ARM and x86
Intra process memory protection for applications on ARM and x86Intra process memory protection for applications on ARM and x86
Intra process memory protection for applications on ARM and x86
 
Scheme to x86コンパイラ
Scheme to x86コンパイラScheme to x86コンパイラ
Scheme to x86コンパイラ
 
家に帰るまでが遠足です
家に帰るまでが遠足です家に帰るまでが遠足です
家に帰るまでが遠足です
 
C++が仲間になりたそうにこちらを見ている
C++が仲間になりたそうにこちらを見ているC++が仲間になりたそうにこちらを見ている
C++が仲間になりたそうにこちらを見ている
 
C++14 solve explicit_default_constructor
C++14 solve explicit_default_constructorC++14 solve explicit_default_constructor
C++14 solve explicit_default_constructor
 
Android HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacyAndroid HAL Introduction: libhardware and its legacy
Android HAL Introduction: libhardware and its legacy
 
C# 뉴비를 위한 맛보기 2
C# 뉴비를 위한 맛보기 2C# 뉴비를 위한 맛보기 2
C# 뉴비를 위한 맛보기 2
 
SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]
 
OpenBSD/sgi SMP implementation for Origin 350
OpenBSD/sgi SMP implementation for Origin 350OpenBSD/sgi SMP implementation for Origin 350
OpenBSD/sgi SMP implementation for Origin 350
 

Ähnlich wie ABI란 무엇인가요?

C++api디자인 1장
C++api디자인 1장C++api디자인 1장
C++api디자인 1장Jihoon Park
 
[170403 2주차]C언어 A반
[170403 2주차]C언어 A반[170403 2주차]C언어 A반
[170403 2주차]C언어 A반arundine
 
Pcl 라이브러리 빌드_튜토리얼
Pcl 라이브러리 빌드_튜토리얼Pcl 라이브러리 빌드_튜토리얼
Pcl 라이브러리 빌드_튜토리얼Hyounggap An
 
D2 OPEN SEMINAR - Smart editor 3.0 swift 도입기 (static library에서 dynamic framew...
D2 OPEN SEMINAR - Smart editor 3.0 swift 도입기 (static library에서 dynamic framew...D2 OPEN SEMINAR - Smart editor 3.0 swift 도입기 (static library에서 dynamic framew...
D2 OPEN SEMINAR - Smart editor 3.0 swift 도입기 (static library에서 dynamic framew...NAVER D2
 
개발 방식을 바꾸는 15가지 기술
개발 방식을 바꾸는 15가지 기술개발 방식을 바꾸는 15가지 기술
개발 방식을 바꾸는 15가지 기술중선 곽
 
인프콘 2022 - Rust 크로스 플랫폼 프로그래밍
인프콘 2022 - Rust 크로스 플랫폼 프로그래밍인프콘 2022 - Rust 크로스 플랫폼 프로그래밍
인프콘 2022 - Rust 크로스 플랫폼 프로그래밍Chris Ohk
 
[H3 2012] Open API 와 Ruby on Rails 에 대한 이야기
[H3 2012] Open API 와 Ruby on Rails 에 대한 이야기[H3 2012] Open API 와 Ruby on Rails 에 대한 이야기
[H3 2012] Open API 와 Ruby on Rails 에 대한 이야기KTH, 케이티하이텔
 
AWS CLOUD 2018- 보다 강력한 Serverless, AWS Lambda 기능 확장(안효빈 솔루션즈 아키텍트)
AWS CLOUD 2018- 보다 강력한 Serverless, AWS Lambda 기능 확장(안효빈 솔루션즈 아키텍트)AWS CLOUD 2018- 보다 강력한 Serverless, AWS Lambda 기능 확장(안효빈 솔루션즈 아키텍트)
AWS CLOUD 2018- 보다 강력한 Serverless, AWS Lambda 기능 확장(안효빈 솔루션즈 아키텍트)Amazon Web Services Korea
 
200819 NAVER TECH CONCERT 07_신입 iOS 개발자 개발업무 적응기
200819 NAVER TECH CONCERT 07_신입 iOS 개발자 개발업무 적응기200819 NAVER TECH CONCERT 07_신입 iOS 개발자 개발업무 적응기
200819 NAVER TECH CONCERT 07_신입 iOS 개발자 개발업무 적응기NAVER Engineering
 
Open API - 웹 플랫폼 생태계를 만드는 기술 (2011)
Open API - 웹 플랫폼 생태계를 만드는 기술 (2011)Open API - 웹 플랫폼 생태계를 만드는 기술 (2011)
Open API - 웹 플랫폼 생태계를 만드는 기술 (2011)Channy Yun
 
[오픈소스컨설팅]인프라 자동화 도구 Chef
[오픈소스컨설팅]인프라 자동화 도구  Chef[오픈소스컨설팅]인프라 자동화 도구  Chef
[오픈소스컨설팅]인프라 자동화 도구 ChefOpen Source Consulting
 
build a linux webhosting server
build a linux webhosting serverbuild a linux webhosting server
build a linux webhosting server정현 윤
 
The Future of C# and .NET Framework
The Future of C# and .NET FrameworkThe Future of C# and .NET Framework
The Future of C# and .NET Framework명신 김
 
강좌 04 펌웨어 구조 설계
강좌 04 펌웨어 구조 설계강좌 04 펌웨어 구조 설계
강좌 04 펌웨어 구조 설계chcbaram
 
왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항
왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항
왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항rockplace
 
PHP로 웹개발을 해보자
PHP로 웹개발을 해보자PHP로 웹개발을 해보자
PHP로 웹개발을 해보자Young Min Shin
 
위클리 발표자료
위클리 발표자료위클리 발표자료
위클리 발표자료hosung kang
 
해커가 되고 싶은 자는 나에게... 정보보안 입문과 길 찾기
해커가 되고 싶은 자는 나에게... 정보보안 입문과 길 찾기해커가 되고 싶은 자는 나에게... 정보보안 입문과 길 찾기
해커가 되고 싶은 자는 나에게... 정보보안 입문과 길 찾기Jinkyoung Kim
 
스프링 스터디 1장
스프링 스터디 1장스프링 스터디 1장
스프링 스터디 1장Seongchan Kang
 

Ähnlich wie ABI란 무엇인가요? (20)

C++api디자인 1장
C++api디자인 1장C++api디자인 1장
C++api디자인 1장
 
[170403 2주차]C언어 A반
[170403 2주차]C언어 A반[170403 2주차]C언어 A반
[170403 2주차]C언어 A반
 
Pcl 라이브러리 빌드_튜토리얼
Pcl 라이브러리 빌드_튜토리얼Pcl 라이브러리 빌드_튜토리얼
Pcl 라이브러리 빌드_튜토리얼
 
D2 OPEN SEMINAR - Smart editor 3.0 swift 도입기 (static library에서 dynamic framew...
D2 OPEN SEMINAR - Smart editor 3.0 swift 도입기 (static library에서 dynamic framew...D2 OPEN SEMINAR - Smart editor 3.0 swift 도입기 (static library에서 dynamic framew...
D2 OPEN SEMINAR - Smart editor 3.0 swift 도입기 (static library에서 dynamic framew...
 
개발 방식을 바꾸는 15가지 기술
개발 방식을 바꾸는 15가지 기술개발 방식을 바꾸는 15가지 기술
개발 방식을 바꾸는 15가지 기술
 
인프콘 2022 - Rust 크로스 플랫폼 프로그래밍
인프콘 2022 - Rust 크로스 플랫폼 프로그래밍인프콘 2022 - Rust 크로스 플랫폼 프로그래밍
인프콘 2022 - Rust 크로스 플랫폼 프로그래밍
 
System+os study 4
System+os study 4System+os study 4
System+os study 4
 
[H3 2012] Open API 와 Ruby on Rails 에 대한 이야기
[H3 2012] Open API 와 Ruby on Rails 에 대한 이야기[H3 2012] Open API 와 Ruby on Rails 에 대한 이야기
[H3 2012] Open API 와 Ruby on Rails 에 대한 이야기
 
AWS CLOUD 2018- 보다 강력한 Serverless, AWS Lambda 기능 확장(안효빈 솔루션즈 아키텍트)
AWS CLOUD 2018- 보다 강력한 Serverless, AWS Lambda 기능 확장(안효빈 솔루션즈 아키텍트)AWS CLOUD 2018- 보다 강력한 Serverless, AWS Lambda 기능 확장(안효빈 솔루션즈 아키텍트)
AWS CLOUD 2018- 보다 강력한 Serverless, AWS Lambda 기능 확장(안효빈 솔루션즈 아키텍트)
 
200819 NAVER TECH CONCERT 07_신입 iOS 개발자 개발업무 적응기
200819 NAVER TECH CONCERT 07_신입 iOS 개발자 개발업무 적응기200819 NAVER TECH CONCERT 07_신입 iOS 개발자 개발업무 적응기
200819 NAVER TECH CONCERT 07_신입 iOS 개발자 개발업무 적응기
 
Open API - 웹 플랫폼 생태계를 만드는 기술 (2011)
Open API - 웹 플랫폼 생태계를 만드는 기술 (2011)Open API - 웹 플랫폼 생태계를 만드는 기술 (2011)
Open API - 웹 플랫폼 생태계를 만드는 기술 (2011)
 
[오픈소스컨설팅]인프라 자동화 도구 Chef
[오픈소스컨설팅]인프라 자동화 도구  Chef[오픈소스컨설팅]인프라 자동화 도구  Chef
[오픈소스컨설팅]인프라 자동화 도구 Chef
 
build a linux webhosting server
build a linux webhosting serverbuild a linux webhosting server
build a linux webhosting server
 
The Future of C# and .NET Framework
The Future of C# and .NET FrameworkThe Future of C# and .NET Framework
The Future of C# and .NET Framework
 
강좌 04 펌웨어 구조 설계
강좌 04 펌웨어 구조 설계강좌 04 펌웨어 구조 설계
강좌 04 펌웨어 구조 설계
 
왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항
왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항
왜 컨테이너인가? - OpenShift 구축 사례와 컨테이너로 환경 전환 시 고려사항
 
PHP로 웹개발을 해보자
PHP로 웹개발을 해보자PHP로 웹개발을 해보자
PHP로 웹개발을 해보자
 
위클리 발표자료
위클리 발표자료위클리 발표자료
위클리 발표자료
 
해커가 되고 싶은 자는 나에게... 정보보안 입문과 길 찾기
해커가 되고 싶은 자는 나에게... 정보보안 입문과 길 찾기해커가 되고 싶은 자는 나에게... 정보보안 입문과 길 찾기
해커가 되고 싶은 자는 나에게... 정보보안 입문과 길 찾기
 
스프링 스터디 1장
스프링 스터디 1장스프링 스터디 1장
스프링 스터디 1장
 

Mehr von 진상 문

Project Anarchy(Vision Engine)으로 게임 툴 만들기! part2
Project Anarchy(Vision Engine)으로 게임 툴 만들기! part2Project Anarchy(Vision Engine)으로 게임 툴 만들기! part2
Project Anarchy(Vision Engine)으로 게임 툴 만들기! part2진상 문
 
[C++ beginner] sizeof()
[C++ beginner] sizeof()[C++ beginner] sizeof()
[C++ beginner] sizeof()진상 문
 
Project Anarchy(Vision Engine)으로 게임 툴 만들기! part1
Project Anarchy(Vision Engine)으로 게임 툴 만들기! part1Project Anarchy(Vision Engine)으로 게임 툴 만들기! part1
Project Anarchy(Vision Engine)으로 게임 툴 만들기! part1진상 문
 
Pervasive computing
Pervasive computingPervasive computing
Pervasive computing진상 문
 
Dll 파일 호출의 2가지 방법
Dll 파일 호출의 2가지 방법Dll 파일 호출의 2가지 방법
Dll 파일 호출의 2가지 방법진상 문
 
무중력 상태에 필요한 기초 물리
무중력 상태에 필요한 기초 물리무중력 상태에 필요한 기초 물리
무중력 상태에 필요한 기초 물리진상 문
 
Easy gameserver
Easy gameserverEasy gameserver
Easy gameserver진상 문
 
Halo ce anniversary Postmortem
Halo ce anniversary PostmortemHalo ce anniversary Postmortem
Halo ce anniversary Postmortem진상 문
 

Mehr von 진상 문 (8)

Project Anarchy(Vision Engine)으로 게임 툴 만들기! part2
Project Anarchy(Vision Engine)으로 게임 툴 만들기! part2Project Anarchy(Vision Engine)으로 게임 툴 만들기! part2
Project Anarchy(Vision Engine)으로 게임 툴 만들기! part2
 
[C++ beginner] sizeof()
[C++ beginner] sizeof()[C++ beginner] sizeof()
[C++ beginner] sizeof()
 
Project Anarchy(Vision Engine)으로 게임 툴 만들기! part1
Project Anarchy(Vision Engine)으로 게임 툴 만들기! part1Project Anarchy(Vision Engine)으로 게임 툴 만들기! part1
Project Anarchy(Vision Engine)으로 게임 툴 만들기! part1
 
Pervasive computing
Pervasive computingPervasive computing
Pervasive computing
 
Dll 파일 호출의 2가지 방법
Dll 파일 호출의 2가지 방법Dll 파일 호출의 2가지 방법
Dll 파일 호출의 2가지 방법
 
무중력 상태에 필요한 기초 물리
무중력 상태에 필요한 기초 물리무중력 상태에 필요한 기초 물리
무중력 상태에 필요한 기초 물리
 
Easy gameserver
Easy gameserverEasy gameserver
Easy gameserver
 
Halo ce anniversary Postmortem
Halo ce anniversary PostmortemHalo ce anniversary Postmortem
Halo ce anniversary Postmortem
 

ABI란 무엇인가요?

  • 2. ABI란? • 응용 프로그램과 운영체제, 응용 프로그램과 라이브러리 사이에 필요한 저 수준 인터페이스를 정의한다 응용 프로그램운영체제 라이브러리
  • 3. ABI란? • API랑 똑같은 거 아냐? • 하지만 API보다 ABI가 저수준(binary)이라는 것 • API는 소스 코드에서 사용되고 ABI는 바이너리에서 호환이 된다 • 아키텍처와 운영체제마다 조금씩 차이가 있다 • 윈도 98에서 돌아가던 게 XP에서도 돌아가는 이유는 MS에서 ABI를 지 원하기 때문이다 • 함수 호출 규약을 정의한다
  • 4. ABI란? • 외부 라이브러리를 사용할 때 중요하다 • 만약 A라는 라이브러리를 사용하고 있을 때 업데이트된 A라이브 러리가 배포되었다. • 외부 라이브러리가 업데이트 됐다고 전체 프로젝트를 다시 컴파일 하고 싶은가? • 만약 업데이트된 라이브러리도 같은 ABI를 지원한다면 프로그램을 변경 하지 않아도 잘 돌아간다 • 서로 다른 버전의 두 라이브러리가 같은 ABI를 가지고 있을 때 “binary- compatible”하다 • 같은 저수준 인터페이스를 가진다는 말
  • 5. ABI가 바뀌면 컴파일 또 해야 된다 • 간혹 ABI 변경을 피할 수 없을 때도 있다 • 그럼 뭐 컴파일 다시 하는 거지… • ABI는 바뀌었는데 API는 그대로인 경우도 있다 • 이걸 “source compatible”하다고 함 • 근데 이거만 가지고는 동작 보장이 안되기 때문에 ABI가 바뀌면 컴파일 을 다시 해야만 함
  • 6. ABI를 변경하지 않으려면? • 이런저런 이유로 ABI가 변경되지 않는 쪽이 바람직하다 • 함수 인터페이스를 바꾸면 안 된다 • 리턴 타입, 매개변수 숫자나 타입 등등 • 자료형 정의나 구조체 정의, 상수 정의 등도 바뀌면 안 된다 • 새 함수나 자료형이 추가되는 것은 가능하다
  • 7. ABI는 어떻게 제공되는가? • ABI는 명시적으로 제공될 필요가 없다 • 사람들이 어셈블리로 코딩한다면(!) 이야기가 달라지지만… • ABI는 특정 언어에 의존적이지 않다. • C언어랑 PASCAL 프로그램도 컴파일 되면 같은 ABI를 쓸 수 있다
  • 8. 결론 • ABI는 calling convention을 다룬다 • ABI 호환성을 유지하면 라이브러리 유지 / 보수가 편해진다 • ABI 호환성을 유지하려면 추가 외에 기존의 라이브러리 값을 함 부로 바꾸면 안 된다 • ABI 호환성이 깨졌을 경우는 re-compile하면 된다