flyonok

统计

留言簿(8)

ACE

book

boost

bsd

c study

c++

code download

codeblock

computer clound

Eclipse

embed system

erlang

ET++

gtk

ic card

java

KDE

libevent

linux

linux--MM

mysql

network education

one card

oracle

pcap relation

php

powerbuilder

python

QT

software config

software test

SQL server

UML

wireless

wxwidgets

陈宾

阅读排行榜

评论排行榜

Linkers and Loaders--page 4 of 4

 in
Discussing how compilers, links and loaders work and the benefits of shared libraries.
Loading Shared Libraries from Applications

Shared libraries can be loaded from applications even in the middle of their executions. An application can request a dynamic linker to load and link shared libraries, even without linking those shared libraries to the executable. Linux, Solaris and other systems provides a series of function calls that can be used to dynamically load a shared object. Linux provides system calls, such as dlopen, dlsym and dlclose, that can be used to load a shared object, to look up a symbol in that shared object and to close the shared object, respectively. On Windows, LoadLibrary and GetProcAddress functions replace dlopen and dlsym, respectively.

Tools for Manipulating Object Files

Here's a list of Linux tools that can be used to explore object/executable files.

  • ar: creates static libraries.

  • objdump: this is the most important binary tool; it can be used to display all the information in an object binary file.

  • strings: list all the printable strings in a binary file.

  • nm: lists the symbols defined in the symbol table of an object file.

  • ldd: lists the shared libraries on which the object binary is dependent.

  • strip: deletes the symbol table information.

Suggested Reading

Linkers and Loaders by John Levine

Linkers and Libraries Guide from Sun

Sandeep Grover works for QuickLogic Software (India) Pvt. Ltd.

posted on 2011-04-20 13:58 flyonok 阅读(341) 评论(0)  编辑 收藏 引用 所属分类: linux


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理