Suche senden
Hochladen
Notes on oracle solaris 11.3 linkers and libraries guide chapter one
•
0 gefällt mir
•
430 views
Wen Liao
Folgen
Notes on oracle solaris 11.3 linkers and libraries guide chapter one
Weniger lesen
Mehr lesen
Software
Melden
Teilen
Melden
Teilen
1 von 9
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
Hello world 的一生
Hello world 的一生
Wen Liao
開放街圖 自助旅行的好幫手
開放街圖 自助旅行的好幫手
Wen Liao
GNU AS簡介
GNU AS簡介
Wen Liao
UPnP 1.0 簡介
UPnP 1.0 簡介
Wen Liao
故事:自由軟體和 Richard Stallman
故事:自由軟體和 Richard Stallman
Wen Liao
Hello world在那邊?背景說明
Hello world在那邊?背景說明
Wen Liao
A successful git branching model 導讀
A successful git branching model 導讀
Wen Liao
GNU ld的linker script簡介
GNU ld的linker script簡介
Wen Liao
Empfohlen
Hello world 的一生
Hello world 的一生
Wen Liao
開放街圖 自助旅行的好幫手
開放街圖 自助旅行的好幫手
Wen Liao
GNU AS簡介
GNU AS簡介
Wen Liao
UPnP 1.0 簡介
UPnP 1.0 簡介
Wen Liao
故事:自由軟體和 Richard Stallman
故事:自由軟體和 Richard Stallman
Wen Liao
Hello world在那邊?背景說明
Hello world在那邊?背景說明
Wen Liao
A successful git branching model 導讀
A successful git branching model 導讀
Wen Liao
GNU ld的linker script簡介
GNU ld的linker script簡介
Wen Liao
Trace 程式碼之皮
Trace 程式碼之皮
Wen Liao
淺談Debian套件打包
淺談Debian套件打包
Wen Liao
GNU Make, Autotools, CMake 簡介
GNU Make, Autotools, CMake 簡介
Wen Liao
A Brief Introduction to Regular Expression with Python 2.7.3 Standard Library
A Brief Introduction to Regular Expression with Python 2.7.3 Standard Library
Wen Liao
GNU gettext簡介 - 以C語言為範例
GNU gettext簡介 - 以C語言為範例
Wen Liao
Guide to GStreamer Application Development Manual: CH1 to CH10
Guide to GStreamer Application Development Manual: CH1 to CH10
Wen Liao
Testing in python 2.7.3
Testing in python 2.7.3
Wen Liao
從組裝軟體中談談軟體發展管理
從組裝軟體中談談軟體發展管理
Wen Liao
軟體組裝心得分享
軟體組裝心得分享
Wen Liao
Introduce to Linux command line
Introduce to Linux command line
Wen Liao
Weitere ähnliche Inhalte
Mehr von Wen Liao
Trace 程式碼之皮
Trace 程式碼之皮
Wen Liao
淺談Debian套件打包
淺談Debian套件打包
Wen Liao
GNU Make, Autotools, CMake 簡介
GNU Make, Autotools, CMake 簡介
Wen Liao
A Brief Introduction to Regular Expression with Python 2.7.3 Standard Library
A Brief Introduction to Regular Expression with Python 2.7.3 Standard Library
Wen Liao
GNU gettext簡介 - 以C語言為範例
GNU gettext簡介 - 以C語言為範例
Wen Liao
Guide to GStreamer Application Development Manual: CH1 to CH10
Guide to GStreamer Application Development Manual: CH1 to CH10
Wen Liao
Testing in python 2.7.3
Testing in python 2.7.3
Wen Liao
從組裝軟體中談談軟體發展管理
從組裝軟體中談談軟體發展管理
Wen Liao
軟體組裝心得分享
軟體組裝心得分享
Wen Liao
Introduce to Linux command line
Introduce to Linux command line
Wen Liao
Mehr von Wen Liao
(10)
Trace 程式碼之皮
Trace 程式碼之皮
淺談Debian套件打包
淺談Debian套件打包
GNU Make, Autotools, CMake 簡介
GNU Make, Autotools, CMake 簡介
A Brief Introduction to Regular Expression with Python 2.7.3 Standard Library
A Brief Introduction to Regular Expression with Python 2.7.3 Standard Library
GNU gettext簡介 - 以C語言為範例
GNU gettext簡介 - 以C語言為範例
Guide to GStreamer Application Development Manual: CH1 to CH10
Guide to GStreamer Application Development Manual: CH1 to CH10
Testing in python 2.7.3
Testing in python 2.7.3
從組裝軟體中談談軟體發展管理
從組裝軟體中談談軟體發展管理
軟體組裝心得分享
軟體組裝心得分享
Introduce to Linux command line
Introduce to Linux command line
Notes on oracle solaris 11.3 linkers and libraries guide chapter one
1.
Notes on Oracle
Solaris 11.3 Linkers and Libraries Guide: Chapter one Wen Liao Oracle is registered trademarks of Oracle and/or its affiliates.
2.
Outlines ● 使用Link-Editor 以及
Runtime Linker ○ Ch 1 ~ 4 ● 參考手冊Quick Reference ○ Ch 5 ● 進階主題 ○ Ch 6 ~ Ch 12 ● ELF ABI ○ Ch 13 ~ Ch 15 ● 附錄 ○ System V Release 4 (Version 1) Mapfiles
3.
Chapter One ● 簡介Link
Editors
4.
Link editor 輸出檔案 輸入檔案 Linker
editor Object 1 Object 2 Object n ... 連連看 Object
5.
輸出 Object 分類 ●
Dynamic executable ○ 由ld.so 載入並執行 ● Shared object ○ 和Dynamic executable 最主要的差別是動態在入時才會被指定 Virtual address ○ 因為多個process可以共享shared object,所以產生shared object需要考慮 ■ 相容性(版本) ■ 效能 ■ 共享的程度 ● Position-independent executable (PIE) ○ Shared object 特例,gcc說只能link成exectable,可透過-fPIE 產生 ● Relocatable object (*.o)
6.
File1.o (Relocatable object) 程式碼(機械碼): foo() {... 有初始值的資料: int
g_var = 0xdeadbeef; 沒有初始值的資料: int g_var_1; Main.o (Relocatable object) 程式碼(機械碼): bar() { ... main() {... 有初始值的資料: int g_var_m = 0xdeadbeef; 沒有初始值的資料: int g_var_2; Linker editor Main (Dynamic Executable,由 ld.so 載入並執行) 程式碼(機械碼): foo() { ... bar() { … main() { ... 有初始值的資料: int g_var = 0xdeadbeef; int g_var_m = 0xdeadbeef; 沒有初始值的資料: int g_var_1; int g_var_2;
7.
Runtime linking ● 透過runtime
linker (ld.so) 載入並執行 dynamic executable ● Dynamic executable 可以runtime 載入 shared object(s) ○ 重點: ABI (Application binary interface) ○ 在linker editor產生dynamic executable時會把一些資 訊存入 ■ Dependency
8.
處理Shared object 方式 ●
Compile time ○ Linker editor將相依的shared object紀錄在輸出的結 果(shared object或是 dynamic executable) ● Runtime ○ Runtime linker載入相關shared object以形成Process
9.
環境變數 (man ld.so) ●
LD_LIBRARY_PATH ○ Shared object search path ● LD_PRELOAD ○ 最先載入的shared object,可用來trace/hook 函數 ● LD_DEBUG ○ 顯示runtime linker行為 ● LD_PROFILE ○ Profile shard object行為
Jetzt herunterladen