170 likes | 425 Views
Toolchain. Toolchain. GNU make – build utility Dependency-tracking Custom build-rules Parallel builds Flexible/Powerful (In use since 1977). Toolchain. GCC – GNU Compiler Collection Open source Support for ~20 targets C/C++/Objective-C/Java/Fortran/Ada
E N D
Toolchain • GNU make – build utility • Dependency-tracking • Custom build-rules • Parallel builds • Flexible/Powerful (In use since 1977)
Toolchain • GCC – GNU Compiler Collection • Open source • Support for ~20 targets • C/C++/Objective-C/Java/Fortran/Ada • Very large community with several companies
Toolchain • GNU binutils – binary tools • as: Assembler • ld: Linking object files • objdump: Dumping object files • addr2line, ar, c++filt, nm, ranlib, objcopy, etc. • Usually supports more target than GCC • Standard in all Linux distrubutions (almost)
Toolchain • File-formats: Text • Makefiles (Controls build-order, programs etc.) • Sources (C, asm) • Linker-scripts (Controls memory-layout) • File-formats: Binary • Object-files (Before linking) • ELF-files (After linking)
Toolchain • GCC – C-Compiler • Higher level, but not too high (portable assembly) • Optimizations (O0, O1, O2, O3, etc.) • Used in laboration 04
Toolchain • Optimizations, what are they good for? • May improve code • May result in smaller code • Beware! May result in code-explosion! • Usually good enough • Can't beat the programmer!
Toolchain • Linking, what is it good for? • Resolving symbols to memory location • Fundamental for modular design! • Merge several object files • Keep track of symbols between files