SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 549 | Next

Shon Harris, Allen Harper, Chris Eagle, and Jonathan Ness

"Gray Hat Hacking, Second Edition"

so, the shared C library. The stripping process has no effect on imported or
exported function and symbol names. This is because the runtime dynamic linker must
be able to resolve these names across the various shared components required by the
program. We will see in the next section that we are not always so lucky when we
encounter statically linked binaries.
Statically Linked Programs and FLAIR
When compiling programs that make use of library functions, the linker must be told
whether to use shared libraries such as .dll or .so files, or static libraries such as .a files.
Programs that use shared libraries are said to be dynamically linked, while programs that
use static libraries are said to be statically linked. Each form of linking has its own advantages
and disadvantages. Dynamic linking results in smaller executables and easier
upgrading of library components at the expense of some extra overhead when launching
the binary, and the chance that the binary will not run if any required libraries are
missing. To learn what dynamic libraries an executable depends on, you can use the
dumpbin utility on Windows, ldd on Linux, and otool on Mac OS X. Each will list the
names of the shared libraries that the loader must find in order to execute a given
dynamically linked program.


Pages:
537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561