diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..16679de --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,52 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +## Our Standards + +Examples of behavior that contributes to a positive environment: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes +* Focusing on what is best for the community + +Examples of unacceptable behavior: + +* The use of sexualized language or imagery +* Trolling, insulting or derogatory comments +* Public or private harassment +* Publishing others' private information +* Other conduct which could reasonably be considered inappropriate + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +[INSERT CONTACT METHOD]. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..50aed21 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,43 @@ +# Contributing to Under The Hood Of Executables + +We love your input! We want to make contributing to this guide as easy and transparent as possible, whether it's: + +- Reporting a typo +- Discussing the current state of the content +- Submitting a fix +- Proposing new sections +- Becoming a maintainer + +## We Develop with Github +We use GitHub to host code, to track issues and feature requests, as well as accept pull requests. + +## Pull Requests +1. Fork the repo and create your branch from `main`. +2. If you've added content, make sure it follows our style guide. +3. If you've changed APIs or functionality, update the documentation. +4. Make sure your code follows our formatting guidelines. +5. Issue that pull request! + +## Any contributions you make will be under the MIT Software License +When you submit code changes, your submissions are understood to be under the same [MIT License](LICENSE) that covers the project. + +## Report issues using Github's [issue tracker](https://github.com/mohitmishra786/underTheHoodOfExecutables/issues) +We use GitHub issues to track public bugs and requests. + +## Write bug reports with detail, background, and sample code + +**Great Bug Reports** tend to have: + +- A quick summary and/or background +- Steps to reproduce + - Be specific! + - Give sample code if you can. +- What you expected would happen +- What actually happens +- Notes (possibly including why you think this might be happening) + +## License +By contributing, you agree that your contributions will be licensed under its MIT License. + +## References +This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md). \ No newline at end of file diff --git a/INDEX.md b/INDEX.md new file mode 100644 index 0000000..756829e --- /dev/null +++ b/INDEX.md @@ -0,0 +1,50 @@ +# From Source to Binary: A C Programmer's Guide to Linking and Loading + +**Part 1: Building Blocks** + +* [**Chapter 1: The Mystery of Executable Size**](https://github.com/mohitmishra786/underTheHoodOfExecutables/tree/main/Ch-1-The-Mystery-Of-Executable-Size) + * [Why is my "Hello World" so Big?](https://github.com/mohitmishra786/underTheHoodOfExecutables/blob/main/Ch-1-The-Mystery-Of-Executable-Size/Why%20is%20my%20%22Hello%20World%22%20so%20Big%3F.md) + +* [**Chapter 2: ELF: Unpacking the Executable and Link Format**](https://github.com/mohitmishra786/underTheHoodOfExecutables/tree/main/Ch-2-The-Executable-And-Linkable-Format) + * [Demystifying the Executable Format](https://github.com/mohitmishra786/underTheHoodOfExecutables/blob/main/Ch-2-The-Executable-And-Linkable-Format/Demystifying-the-Executable-Format.md) + +* [**Chapter 3: Sections: Organizing Code and Data**](https://github.com/mohitmishra786/underTheHoodOfExecutables/tree/main/Ch-3-Sections-Organizing-Code-And-Data) + * [Understanding ELF Sections](https://github.com/mohitmishra786/underTheHoodOfExecutables/blob/main/Ch-3-Sections-Organizing-Code-And-Data/Understanding-ELF-Sections.md) + +* [**Chapter 4: Global Variables and Initialization**](https://github.com/mohitmishra786/underTheHoodOfExecutables/tree/main/Ch-4-Global-Variables-And-Initialization) + * [The Secret Life of Global Variables in C](https://github.com/mohitmishra786/underTheHoodOfExecutables/blob/main/Ch-4-Global-Variables-And-Initialization/The-Secret-Life-of-Global-Variables-in-C.md) + +**Part 2: The Linker's Dance** + +* [**Chapter 5: The Linker's Role: Piecing Together the Puzzle**](https://github.com/mohitmishra786/underTheHoodOfExecutables/tree/main/Ch-5-The-Linker's-Role) + * [Bringing The C Code Together](https://github.com/mohitmishra786/underTheHoodOfExecutables/blob/main/Ch-5-The-Linker's-Role/Bringing-The-C-Code-Together.md) + +* [**Chapter 6: Relocations: Patching the Code**](https://github.com/mohitmishra786/underTheHoodOfExecutables/tree/main/Ch-6-Relocations-Patching-The-Code) + * [The Linker's Patchwork](https://github.com/mohitmishra786/underTheHoodOfExecutables/blob/main/Ch-6-Relocations-Patching-The-Code/The%20Linker's%20Patchwork.md) + +* [**Chapter 7: Symbols: Identifying and Resolving References**](https://github.com/mohitmishra786/underTheHoodOfExecutables/tree/main/Ch-7-Symbols) + * [Symbols](https://github.com/mohitmishra786/underTheHoodOfExecutables/blob/main/Ch-7-Symbols/Symbols.md) + +* [**Chapter 8: Linker Scripts: Controlling the Layout**](https://github.com/mohitmishra786/underTheHoodOfExecutables/tree/main/Ch-8-Customizing-The-Layout) + * [Introduction To Linker Scripts](https://github.com/mohitmishra786/underTheHoodOfExecutables/blob/main/Ch-8-Customizing-The-Layout/Introduction-To-Linker-Scripts.md) + +**Part 3: Dynamic Linking: Sharing and Flexibility** + +* [**Chapter 9: Dynamic Linking: Sharing Code and Resources**](https://github.com/mohitmishra786/underTheHoodOfExecutables/tree/main/Ch-9-Dynamic-Linking) + * [Shrinking Executables and Sharing Code](https://github.com/mohitmishra786/underTheHoodOfExecutables/blob/main/Ch-9-Dynamic-Linking/Shrinking%20Executables%20and%20Sharing%20Code.md) + +* [**Chapter 10: The Dynamic Linking Process**](https://github.com/mohitmishra786/underTheHoodOfExecutables/tree/main/Ch-10-Dynamic-Linking-Process) + * [Lazy Loading: Dynamic Linking on Demand](https://github.com/mohitmishra786/underTheHoodOfExecutables/blob/main/Ch-10-Dynamic-Linking-Process/Lazy%20Loading:%20Dynamic%20Linking%20on%20Demand.md) + +* [**Chapter 11: Controlling Dynamic Linking Behavior**](https://github.com/mohitmishra786/underTheHoodOfExecutables/tree/main/Ch-11-Controlling-Dynamic-Linking-Behavior) + * [Taking Control: Environment Variables For Dynamic Linking](https://github.com/mohitmishra786/underTheHoodOfExecutables/blob/main/Ch-11-Controlling-Dynamic-Linking-Behavior/Taking-Control-Environment-Variables-For-Dynamic-Linking.md) + +**Part 4: Advanced Linking and Optimization** + +* [**Chapter 12: Weak Symbols and Link-Time Optimization**](https://github.com/mohitmishra786/underTheHoodOfExecutables/tree/main/Ch-12-Weak-Symbols) + * [Weak Symbols: A Linker's Flexibility](https://github.com/mohitmishra786/underTheHoodOfExecutables/blob/main/Ch-12-Weak-Symbols/Weak%20Symbols:%20A%20Linker's%20Flexibility.md) + +**Part 5: Looking Ahead** + +* [**Chapter 13: Conclusion: A Deeper Understanding**](https://github.com/mohitmishra786/underTheHoodOfExecutables/tree/main/Ch-13-Final-Chapter) + * [Level Up Your C](https://github.com/mohitmishra786/underTheHoodOfExecutables/blob/main/Ch-13-Final-Chapter/Level-Up-Your-C.md) \ No newline at end of file diff --git a/README.md b/README.md index fe98058..ec49e13 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,53 @@ -# From Source to Binary: A C Programmer's Guide to Linking and Loading +# Under The Hood Of Executables 🔍 -**Chapter Breakdown:** +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md) +[![Made with Love](https://img.shields.io/badge/Made%20with-❤-red.svg)](https://github.com/mohitmishra786/underTheHoodOfExecutables) -**Part 1: Building Blocks** +An in-depth exploration of how C programs transform from source code to executable binaries. This repository contains a comprehensive guide to understanding linking, loading, and executable formats. -* **Chapter 1: The Mystery of Executable Size** -* **Chapter 2: ELF: Unpacking the Executable and Link Format** -* **Chapter 3: Sections: Organizing Code and Data** -* **Chapter 4: Global Variables and Initialization** +## 📚 Book Website -**Part 2: The Linker's Dance** +Visit our interactive book website: [Under The Hood Of Executables](https://mohitmishra786.github.io/underTheHoodOfExecutables/) -* **Chapter 5: The Linker's Role: Piecing Together the Puzzle** -* **Chapter 6: Relocations: Patching the Code** -* **Chapter 7: Symbols: Identifying and Resolving References** -* **Chapter 8: Linker Scripts: Controlling the Layout** +## 🌟 Features -**Part 3: Dynamic Linking: Sharing and Flexibility** +- Detailed explanations of ELF format +- Deep dive into linking and loading processes +- Practical examples and case studies +- Interactive diagrams and illustrations +- Step-by-step tutorials +- Real-world applications +- Performance optimization insights -* **Chapter 9: Dynamic Linking: Sharing Code and Resources** -* **Chapter 10: The Dynamic Linking Process: Lazy Loading and Resolution** -* **Chapter 11: Controlling Dynamic Linking Behavior** +## 📖 Content Structure -**Part 4: Advanced Linking and Optimization** +The book is organized into five parts, each focusing on different aspects of the compilation and linking process. [View detailed content structure](index.md) -* **Chapter 12: Weak Symbols and Link-Time Optimization** +## 🚀 Getting Started -**Part 5: Looking Ahead** +1. Clone the repository: + ```bash + git clone https://github.com/mohitmishra786/underTheHoodOfExecutables.git + ``` -* **Chapter 13: Conclusion: A Deeper Understanding** +2. Navigate to the chapter you're interested in: + ```bash + cd underTheHoodOfExecutables + ``` + +3. Read the chapters in markdown format or visit our [website](https://mohitmishra786.github.io/underTheHoodOfExecutables/) for an enhanced reading experience. + +## 🤝 Contributing + +Contributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md) before getting started. + +## 📄 License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. + +## 🙏 Acknowledgments + +- All contributors who have helped improve this guide +- The C programming community +- Open source tools and documentation that made this possible \ No newline at end of file diff --git a/index.html b/index.html index ff1ea4c..0613ef6 100644 --- a/index.html +++ b/index.html @@ -146,7 +146,7 @@