Pathway Introduction: Information Technology

Pathway Introduction: Information Technology

Object Files & Linking Object Sections Compiled code store as object files Linux : ELF : Extensible Linking Format Windows : PE : Portable Execution

Object Sections ELF sections .text : Executable code read/executable .rodata : Read Only Data

read .data : Data read/write .bss : Uninitialized Data read/write

Object at Runtime At runtime segments loaded into process address space Object at Runtime Linker combines multiple object files into one

Addresses in each .o must be relocatable Linker fixes all addresses to final destination Relocation Code sample: Array in .data

getNum accesses getBiggerNum calls others Relocation Offsets

Relocation Do not have final addresses for branches & loads

Relocation Table Relocation Table stores addresses that need fixing at link time: Offset of

item Address it needs Relocation

Linker fixes up Static Libraries Static Libraries: Collection of 1+ object files designed to bake into executable at compile time

Windows : mylibrary.lib Linux mylibrary.a Static Libraries Static Issues: All library code included in every executable

Every running program has own copies of in memory Need to recompile to use new library code Dynamic Libraries Dynamic Libraries:

Collection of 1+ object files designed to be linked at run time Windows : mylibrary.dll (dynamically linked library) Linux mylibrary.so (shared object) Dynamic Libraries

Dynamic Wins: Executable does not need lib code Every running program can share one copy of library May not need to recompile to use new library code

Dynamic Libraries Dynamic Wins: Every running program can share one copy of library Library code must not be modifiable in .text

Dynamic Libraries Dynamic Wins: May not need to recompile to use new library code As long as no features removed/reordered

Dynamic Sample Program to make use of dynamic library: Dynamic Sample Program to make use of dynamic library:

Function calls now go to [email protected] PLT Procedure Linkage Table Jump table in .data used to look up dynamic functions

PLT First call, Global Offset Table points back to code to dynamic loader PLT

Loader replaces GOT record with address of function Future calls go from PLT to GOT directly to function Other Dynamic Tricks

Can load library at run time: Other Dynamic Tricks Can load library at run time: Other Dynamic Tricks

Can hijack dynamic library calls Hacking Debugging

Recently Viewed Presentations

  • Generative Adversarial Nets - Middle East Technical University

    Generative Adversarial Nets - Middle East Technical University

    "Unsupervised representation learning with deep convolutional generative adversarial networks." arXiv preprint arXiv:1511.06434 (2015). [4] Ledig, Christian, et al. "Photo-realistic single image super-resolution using a generative adversarial network." arXiv.
  • Canadian Culture (A Quick Look)

    Canadian Culture (A Quick Look)

    Canadian Culture (A Quick Look) By Cathy Chang
  • Los Angeles Unified School District Local District Northwest

    Los Angeles Unified School District Local District Northwest

    Single Plan For Student Achievement. November 19, 2015. How to Analyze Data and Develop SMART Goals. Los Angeles Unified School District. Local District Northwest
  • Egypt as a Lead Country on Youth Employment

    Egypt as a Lead Country on Youth Employment

    YEN is a partnership of UN, ILO and World Bank As a network we focus on: Policy advice on youth employment Innovative pilot programs Knowledge sharing Capacity building for youth organizations ...
  • Research Administration Forum

    Research Administration Forum

    The IAMS Template Forms will be updated for 2017 to include a line for IA Number. If you are completing forms for a new proposal, leave this line blank. If you are submitting a supplemental, continuation, renewal proposal make sure...
  • Cultural Intelligence in A Vuca World

    Cultural Intelligence in A Vuca World

    Culture is the collection of values, beliefs, attitudes, and behaviors of a group of people who are expected to behave a certain way. Culture can be viewed as "front-stage" (superficial) or "back-stage" (deep). Global leaders need to pursue a deep...
  • Climate Change vs. Fire Protection

    Climate Change vs. Fire Protection

    Overview Climate Change Science Policy - International, Europe, United States HFCs - Montreal Protocol, EU F-gas Regulation, Australia Carbon Tax ICAO Resolution Climate Change - Science Two-year study of earth surface temperatures by prominent physicist and climate skeptic Richard Mueller...
  • Classification - Pc\|Mac

    Classification - Pc\|Mac

    Protists cause some of the world's most well known infectious diseases. The phylum _____ includes about 4000 species, all of which are parasites of animals. Most members of this phylum are known as sporozoans because they form _____ - infectious...