Join our Newsletter — 33% off our NHI Course

What is the difference between .symtab and .dynsym in ELF files?

.symtab is the broader symbol table used for the binary’s full local and global symbol information, while .dynsym holds only the symbols needed for dynamic linking at runtime. A stripped binary may lose .symtab and .strtab, but .dynsym often remains because the loader still needs it to resolve external references.

How .symtab and .dynsym differ in purpose

The key difference is scope. .symtab is the full symbol table for the object file, so it can include local symbols, internal helper functions, section symbols, and other details useful to debuggers, linkers, and reverse engineering tools. .dynsym is a smaller runtime symbol table that contains only the symbols the dynamic loader needs to resolve shared-library references and exported interfaces.

That means .symtab is about complete build-time visibility, while .dynsym is about what must remain visible at load time. In many production binaries, especially stripped ones, .symtab is removed to reduce size and hide implementation detail, but .dynsym often remains because runtime relocation and symbol resolution still depend on it.

Why stripped binaries usually keep .dynsym

Stripping a binary does not remove every symbol-related section. It usually removes the richer non-dynamic symbol information, along with many debug-oriented sections, but it must preserve the runtime-facing metadata that the loader and shared libraries rely on. If an executable or shared object exports functions or references external symbols, the dynamic linker still needs a usable .dynsym to perform binding.

This is why .dynsym is commonly visible even when a binary has been stripped. The loader does not need the full internal inventory of symbols; it needs the subset that participates in relocation, interposition, and dynamic linking. By contrast, .symtab is often absent in release builds because it is not required for execution.

For deeper background on ELF symbol handling and runtime linkage, the ELF format specification summary is a useful reference, and the GNU linker documentation helps explain which symbols are preserved for linking versus stripped for distribution.

What this means when inspecting binaries

When you are analyzing a binary, .symtab tells you much more about the original build artifact than .dynsym does. If .symtab is present, you can often recover internal function names, local symbols, and richer structural clues. If only .dynsym is present, you can still learn about exported APIs and external dependencies, but you lose most of the internal naming context.

That distinction matters for both reverse engineering and operational troubleshooting. .dynsym can reveal which shared objects or exported entry points matter at runtime, while .symtab can make control-flow recovery and source correlation substantially easier. A stripped binary is therefore not anonymous, it is simply less descriptive.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK addresses the attack and risk surface, while OWASP ASVS and CIS Controls v8 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP ASVS V15 — Secure Coding and Architecture ELF symbol tables affect binary structure and exposed interfaces.
Recommendation — Review stripped builds to confirm only intended runtime symbols remain visible.
CIS Controls v8 CIS-16 — Application Software Security Binary inspection and release hardening relate to software artifact exposure.
Recommendation — Validate release artifacts to remove unnecessary symbols and debug metadata.
MITRE ATT&CK T1027 — Obfuscated Files or Information Stripping symbols changes artifact visibility and can affect analyst interpretation.
Recommendation — Inspect binaries for symbol stripping and related artifact hiding techniques.

Practitioner Guidance

What to verify: If a binary still has .dynsym, distinguish exported runtime interfaces from internal implementation symbols before drawing conclusions about what the program can do. Treat the presence of .symtab as a strong signal that the artifact is closer to a debug or unstripped build.

Common mistake: Do not assume that stripped means symbol-free. Many operators check only for debug sections and miss the fact that .dynsym may still expose enough information to map dependencies, interceptable functions, or externally visible behavior.

Practitioner takeaway: .symtab is the richer, mostly build-time symbol inventory; .dynsym is the runtime subset that dynamic linking still needs, so they serve different analysis and disclosure purposes.