<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Lungile Mabelebele on Medium]]></title>
        <description><![CDATA[Stories by Lungile Mabelebele on Medium]]></description>
        <link>https://medium.com/@l.mabelebel?source=rss-e21b31927a2d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*kqM-Fb-eSIr9wnvx</url>
            <title>Stories by Lungile Mabelebele on Medium</title>
            <link>https://medium.com/@l.mabelebel?source=rss-e21b31927a2d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 06:01:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@l.mabelebel/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ Understanding the ELF Format: A Deep Dive into Executables on Linux]]></title>
            <link>https://medium.com/@l.mabelebel/understanding-the-elf-format-a-deep-dive-into-executables-on-linux-2d41da6a578b?source=rss-e21b31927a2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d41da6a578b</guid>
            <dc:creator><![CDATA[Lungile Mabelebele]]></dc:creator>
            <pubDate>Sun, 19 Oct 2025 17:42:27 GMT</pubDate>
            <atom:updated>2025-10-19T17:42:27.262Z</atom:updated>
            <content:encoded><![CDATA[<p>When you compile a C or C++ program on Linux, the output isn’t just a random stream of bytes — it’s a well-structured file format known as <strong>ELF</strong>, short for <strong>Executable and Linkable Format</strong>. ELF files are at the heart of how Linux and other Unix-like systems execute programs, manage shared libraries, and handle debugging and linking.</p><p>Let’s take a deep dive into what ELF is, why it’s used, what it contains, and how we can explore it using tools like readelf, nm, and objdump.</p><h3>🧠 What Is ELF?</h3><p><strong>ELF (Executable and Linkable Format)</strong> is a <strong>standard binary file format</strong> used for executables, object code, shared libraries, and core dumps on Unix-like operating systems (Linux, FreeBSD, etc.).</p><p>It defines how data and instructions are organized inside the binary so that the operating system loader and linker know <strong>where to find code, symbols, and metadata</strong>.</p><p>ELF files can represent several types of files:</p><ul><li><strong>Executable files</strong> (ET_EXEC): Ready-to-run programs.</li><li><strong>Relocatable object files</strong> (ET_REL): Intermediate files used during compilation (e.g., .o files).</li><li><strong>Shared libraries</strong> (ET_DYN): Dynamically linked libraries (e.g., .so files).</li><li><strong>Core dumps</strong> (ET_CORE): Memory snapshots used for debugging.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bTAHsOlWGnKu-TQssjQSRQ.png" /></figure><h3>⚙️ Why Is ELF Used?</h3><p>ELF provides a <strong>flexible, portable, and extensible</strong> structure that suits modern systems’ needs. Here’s why it’s widely used:</p><ol><li><strong>Portability</strong> — Works across various CPU architectures (x86, ARM, RISC-V, etc.).</li><li><strong>Extensibility</strong> — Can include additional sections and headers without breaking compatibility.</li><li><strong>Dynamic Linking Support</strong> — Enables the use of shared libraries to save memory and reduce file size.</li><li><strong>Debugging and Profiling</strong> — Contains symbol and debugging information for tools like GDB and Valgrind.</li><li><strong>Efficiency</strong> — Well-defined layout for fast loading by the operating system.</li></ol><h3>🧱 What Information Is Stored in an ELF File?</h3><p>An ELF file isn’t just code — it’s a collection of <strong>headers, sections, and segments</strong>, each storing a specific type of data. The structure generally includes:</p><ol><li><strong>ELF Header</strong> — Describes the overall file type, architecture, and entry point.</li><li><strong>Program Headers (Segments)</strong> — Describe how the file should be loaded into memory.</li><li><strong>Section Headers (Sections)</strong> — Contain detailed data for linking and debugging.</li><li><strong>Symbol Tables</strong> — Hold variable and function names used by linkers and debuggers.</li><li><strong>String Tables</strong> — Contain human-readable names (for symbols, sections, etc.).</li><li><strong>Relocation Entries</strong> — Indicate places where addresses need to be updated when linking.</li><li><strong>Dynamic Section</strong> — Provides information for dynamic linking at runtime.</li></ol><h3>📦 How Is This Information Stored?</h3><p>Let’s break down how an ELF file organizes data internally.</p><h3>1. ELF Header</h3><p>Located at the very beginning of the file, this header identifies the file as an ELF binary.<br>It includes:</p><ul><li>Magic number (0x7F followed by ELF)</li><li>File type (ET_EXEC, ET_REL, etc.)</li><li>Target architecture (x86, ARM, etc.)</li><li>Entry point address (where execution starts)</li><li>Offsets for program and section headers</li></ul><h3>2. Program Header Table</h3><p>This tells the operating system <strong>how to map the file into memory</strong> when executed.<br>For example:</p><ul><li>One segment might represent the code (text section)</li><li>Another segment the data (initialized variables)</li></ul><h3>3. Section Header Table</h3><p>Sections organize information for the <strong>linker</strong> and <strong>debugger</strong>. Common sections include:</p><ul><li>.text – Executable instructions</li><li>.data – Initialized global variables</li><li>.bss – Uninitialized data</li><li>.rodata – Read-only data (e.g., string literals)</li><li>.symtab – Symbol table</li><li>.strtab – String table</li><li>.rel / .rela – Relocation info</li></ul><h3>🔍 How to Parse an ELF File</h3><p>Parsing an ELF file involves reading its headers and extracting structured information.<br>Here’s the general approach:</p><ol><li><strong>Read the ELF Header</strong> to verify the magic number (0x7F, &#39;E&#39;, &#39;L&#39;, &#39;F&#39;).</li><li><strong>Read the Program Header Table</strong> to understand how segments are loaded.</li><li><strong>Read the Section Header Table</strong> to locate .text, .data, .symtab, etc.</li><li><strong>Extract Symbol and String Tables</strong> to interpret function and variable names.</li><li><strong>Display or analyze</strong> the data based on your needs (e.g., reverse engineering, debugging).</li></ol><p>You can do this programmatically using C with &lt;elf.h&gt; or with Python libraries like pyelftools.</p><h3>🧩 The readelf Command</h3><p>readelf is a Linux utility that displays information from ELF files in human-readable form.<br>It’s similar to objdump, but focuses exclusively on ELF structures.</p><p><strong>Examples:</strong></p><ul><li>Show the ELF header:</li><li>readelf -h myprogram</li><li>Display all section headers:</li><li>readelf -S myprogram</li><li>Show the symbol table:</li><li>readelf -s myprogram</li><li>Show all information:</li><li>readelf -a myprogram</li></ul><p>readelf is a <strong>safe and direct</strong> way to inspect ELF internals without disassembling the code.</p><h3>🧭 The nm Command</h3><p>nm lists the <strong>symbols</strong> (functions, variables, etc.) defined and used in object files or executables.</p><p><strong>Why use it?</strong><br>It’s useful for debugging, linking, and reverse engineering — you can see which symbols are <strong>defined</strong>, <strong>undefined</strong>, or <strong>external</strong>.</p><p><strong>Example:</strong></p><pre>nm -p myprogram.o</pre><p>Output might look like:</p><pre>0000000000401136 T main<br>0000000000401110 T _start<br>0000000000601048 D global_var<br>                 U printf</pre><p>Legend:</p><ul><li>T — symbol in text (code) section</li><li>D — symbol in data section</li><li>U — undefined (external)</li></ul><p>So, nm helps you understand what your program defines and depends on.</p><h3>🔧 The objdump Command</h3><p>objdump is the <strong>Swiss army knife</strong> for binary analysis. It can <strong>disassemble</strong>, <strong>inspect headers</strong>, and <strong>display sections</strong> of ELF files.</p><p><strong>Common usages:</strong></p><ul><li>Display all headers:</li><li>objdump -x myprogram</li><li>Disassemble the code:</li><li>objdump -d myprogram</li><li>Show the contents of specific sections:</li><li>objdump -s -j .text myprogram</li></ul><p>objdump combines the capabilities of readelf and nm while also providing <strong>assembly-level insight</strong> — perfect for low-level debugging and reverse engineering.</p><h3>🧭 Summary</h3><p>ToolPurposeExample Command<strong>readelf</strong>Read ELF headers and metadatareadelf -a file<strong>nm</strong>List symbols and their addressesnm -p file<strong>objdump</strong>Disassemble and inspect binariesobjdump -d file</p><h3>🚀 Final Thoughts</h3><p>The ELF format is one of the most robust and versatile executable file formats ever designed. Its modular structure makes it easy for the operating system, linker, and debugger to cooperate seamlessly.</p><p>By mastering tools like readelf, nm, and objdump, you gain the ability to <strong>peek under the hood</strong> of any Linux binary — an essential skill for system programmers, reverse engineers, and security researchers alike.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d41da6a578b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PRESS RELEASE]]></title>
            <link>https://medium.com/@l.mabelebel/press-release-12a7e41ce0b9?source=rss-e21b31927a2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/12a7e41ce0b9</guid>
            <category><![CDATA[press-release]]></category>
            <dc:creator><![CDATA[Lungile Mabelebele]]></dc:creator>
            <pubDate>Tue, 04 Mar 2025 17:50:45 GMT</pubDate>
            <atom:updated>2025-03-04T18:23:27.138Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*effmHbs219q4Rz1YJ2KrHA.jpeg" /></figure><p><strong>PRESS RELEASE</strong></p><p><strong>Contact:</strong> <br>Lungile Mabelebele <br><a href="/service/mailto:l.mabelebel@alustudent.com">l.mabelebel@alustudent.com<br></a>+266 5883 7008</p><p><strong>Date: 28 February 2025</strong></p><p><strong>Bridging the Digital Divide: “Digital Empowerment Initiative” Launches to Transform Communities in Lesotho</strong></p><p><strong>Maseru, Lesotho</strong> — The “Digital Empowerment Initiative,” spearheaded by Lungile Mabelebele, officially launched today, marking a significant step towards fostering digital literacy and empowering communities across Lesotho. Recognising the critical need for digital skills in today’s rapidly evolving world, the initiative aims to create dynamic, interactive learning environments that promote collaboration, problem-solving, and lifelong learning.</p><p>This initiative directly addresses the growing gap in digital competency by offering a series of hands-on workshops and personalised mentorship programs. These programs are designed to equip community members with the tools and knowledge necessary to navigate the digital landscape, tackle local challenges, and unlock new opportunities for personal and professional growth.</p><p><strong>Key Highlights of the Digital Empowerment Initiative:</strong></p><ul><li><strong>Launch Date &amp; Location:</strong> The inaugural workshop will commence on <strong>03 March 2025</strong> at <strong>Maseru</strong>.</li><li><strong>Personalised Mentorship &amp; Dynamic Training:</strong> Participants will benefit from tailored guidance and engaging, interactive learning methods, moving away from traditional lecture-based approaches.</li><li><strong>Collaborative Community Building:</strong> The initiative will foster a supportive and inclusive atmosphere, encouraging peer-to-peer learning and knowledge sharing.</li><li><strong>Addressing Urgent Digital Skills Needs:</strong> The program directly responds to the increasing demand for accessible and ongoing digital education, empowering individuals to thrive in a digital-first world.</li><li><strong>Data-Driven Approach:</strong> Recent user research confirms a strong preference for interactive learning, validating the initiative’s innovative educational approach.</li></ul><p>“We believe that empowering our communities with essential digital skills will create a powerful ripple effect of positive change,” stated Lungile Mabelebele, Founder of the Digital Empowerment Initiative. “Our mission is to cultivate a continuous learning and empowerment culture, ensuring that no one is left behind in the digital age.”</p><p><strong>Background &amp; Mission:</strong></p><p>The Digital Empowerment Initiative was born from a deep understanding of the barriers that prevent many individuals from accessing quality digital education. By providing practical, community-centered learning solutions, the initiative aims to bridge the digital divide and create an inclusive environment where everyone has the opportunity to succeed. The emphasis on collaboration and personalised interaction ensures that learning is both impactful and sustainable.</p><p><strong>Call to Action:</strong></p><p>The Digital Empowerment Initiative invites community members, local organisations, businesses, and stakeholders to join this transformative journey. We encourage participation in upcoming workshops, support through partnerships, and contributions to our mission.</p><p><strong>For more information on how to participate, attend workshops, or support the Digital Empowerment Initiative, please contact Lungile Mabelebele at </strong>l.mabelebel@alustudent.com<strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12a7e41ce0b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Do SQL database Engines Work?]]></title>
            <link>https://medium.com/@l.mabelebel/how-do-sql-database-engines-work-64dbd808b858?source=rss-e21b31927a2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/64dbd808b858</guid>
            <dc:creator><![CDATA[Lungile Mabelebele]]></dc:creator>
            <pubDate>Sun, 24 Mar 2024 11:18:08 GMT</pubDate>
            <atom:updated>2024-03-24T11:18:08.345Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hEKssFBoydx7cDFF" /></figure><h3>Introduction</h3><p>Structured Query Language (SQL) is a powerful tool for managing large amounts of data in relational databases. But have you ever wondered how SQL database engines work behind the scenes? In this blog post, we’ll explore the inner workings of SQL database engines, from data retrieval to query execution.</p><h3>The Basics</h3><p>At its core, a SQL database engine is a software system that manages data and facilitates interactions using SQL. It acts as an intermediary between the user and the database, handling tasks like storage, retrieval, and manipulation. Let’s dive deeper into how it all works.</p><h3>Data Retrieval</h3><ol><li><strong>Data Collection</strong>: Data arrives at the server from various sources (e.g., Apache or Nginx platforms). The server processes this data into tables and stores it in a data warehouse server. Typically, the data is converted into a format (e.g., JSON) that the database can use.</li><li><strong>Database Warehouse</strong>: The database warehouse serves as the core database engine. It allows SQL clients to connect and communicate with it. When a SQL client sends a query, the database warehouse processes it.</li></ol><h3>Query Compilation and Execution</h3><ol><li><strong>Compiling (Parsing and Binding)</strong>:</li></ol><ul><li>The SQL statement is translated into byte code by the compiler.</li><li>The virtual machine evaluates the byte code.</li><li>Think of this process as similar to how a low-level programming language like GCC works.</li></ul><p><strong>2. Optimizing</strong>:</p><ul><li>The database engine optimizes the query execution plan.</li><li>It considers indexes, joins, and other factors to improve performance.</li></ul><p><strong>3. Executing</strong>:</p><ul><li>The optimized query plan is executed.</li><li>Data is retrieved, filtered, and transformed according to the query.</li><li>The result is sent back to the SQL client.</li></ul><h3>Example: Retrieving Employee Names</h3><p>Suppose we want to retrieve the names of all employees from an “Employees” table. We write the SQL query:</p><pre>Code:<br>SELECT FirstName, LastName FROM Employees;<br><br>Output:<br>+-----------+----------+<br>| FirstName | LastName |<br>+-----------+----------+<br>| John      | Obure     |<br>| Jane      | Smith    |<br>| Michael   | Johnson  |<br>| Emily     | Ndaymanje  |<br>+-----------+----------+<br>   </pre><ol><li>The query is compiled into byte code.</li><li>The database engine optimizes the query plan.</li><li>The engine scans the “Employees” table, retrieves the first and last names, and sends the result to the SQL client.</li></ol><h3>Diagram</h3><p>Here’s a simplified diagram of the process:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/0*lwsVQM7RZXnyfxwO.png" /></figure><p>!SQL Engine Diagram</p><h3>Conclusion</h3><p>SQL database engines are essential for managing data efficiently. Understanding their inner workings helps us appreciate the magic behind our SQL queries. Next time you write a query, remember the journey it takes through the database engine!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64dbd808b858" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>