<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-catalog-what-a-library-promises-when-it-lets-you-check-something-out-sfis3aw2c" -->

---
title: The Catalog: What a Library Promises When It Lets You...
description: Export tables, name decoration, and linker machinery form the visible part of the ABI, the contract a shared library publishes so a call can find its way to...
canonical: https://daily.dev/posts/the-catalog-what-a-library-promises-when-it-lets-you-check-something-out-sfis3aw2c
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The Catalog: What a Library Promises When It Lets You Check Something Out | daily.dev
og:description: Export tables, name decoration, and linker machinery form the visible part of the ABI, the contract a shared library publishes so a call can find its way to...
og:url: https://daily.dev/posts/the-catalog-what-a-library-promises-when-it-lets-you-check-something-out-sfis3aw2c
og:image: https://api.daily.dev/og/posts/SFiS3AW2c.png
og:image:alt: The Catalog: What a Library Promises When It Lets You Check Something Out
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The Catalog: What a Library Promises When It Lets You Check Something Out

**[Speaking in Swift](https://daily.dev/sources/speakinginswift)** · 65 min read · 0 upvotes · 0 comments

## Summary

Export tables, name decoration, and linker machinery form the visible part of the ABI, the contract a shared library publishes so a call can find its way to code. Windows' PE export directory caps a single DLL at roughly 64K exports because ordinals are 16-bit. Swift's symbol mangling evolved from _T to $s as its ABI stabilized, with $e reserved for Embedded Swift. ELF stores exports in a flat dynamic symbol table, Mach-O encodes them as a prefix trie for fast lookup of long Swift names, and PE/COFF uses parallel name, ordinal, and address arrays. RELRO, chained fixups, and eager IAT binding are how Linux, macOS, and Windows each moved away from writable, lazily-bound tables as an attack surface.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://speakinginswift.substack.com/p/the-catalog-what-a-library-promises>

## Questions this post answers

### Why does a single Windows DLL have a maximum number of exported functions?

The PE export directory encodes each ordinal as a 16-bit number, giving 65,536 possible positions, so a single DLL can publish on the order of 64,000 exports through its Export Address Table. This ceiling is rarely hit in practice, since it would take tens of thousands of distinct public entry points in one module to approach it, but it is structural and forces monolithic or template-heavy libraries to split across multiple DLLs.

_Track PE format limits like this on daily.dev before they bite during a DLL split or refactor._

### Why did Swift change its name mangling prefix from _T to $s?

Swift's mangling scheme moved through several prefixes as the ABI evolved: the original Itanium-style _T, lengthened to _T0 in Swift 4.0, then $S in Swift 4.2, and finally $s once the ABI stabilized in Swift 5, with $e reserved for Embedded Swift. Each distinct prefix lets tools identify which mangling version they're reading, which mattered while the scheme was still changing.

_Developers debugging Swift symbol names can keep ABI mangling history handy on daily.dev._

### What is the difference between how ELF and Mach-O store a shared library's exported symbols?

ELF's dynamic symbol table (.dynsym) is a flat table where everything is exported unless explicitly hidden, while Mach-O stores exports as a trie (prefix tree) keyed on the characters of the decorated name under the LC_DYLD_EXPORTS_TRIE load command. The trie shares common prefixes like Swift's '$s' and module name once across all symbols, making lookup O(name length) rather than O(symbol count), which is much smaller and faster for frameworks exporting tens of thousands of Swift symbols.

_Engineers comparing binary formats across platforms can follow deep ABI breakdowns like this on daily.dev._

## Similar posts on daily.dev

- [Thoroughly Understanding C\+\+ ABI](https://daily.dev/posts/thoroughly-understanding-c-abi-31gh0fage) · Hacker News · 3 upvotes · 0 comments
- [A Public Symbol Server for Swift on Windows](https://daily.dev/posts/a-public-symbol-server-for-swift-on-windows-2awqiqhtb) · Speaking in Swift · 0 upvotes · 0 comments
- [Huge binaries: papercuts and limits](https://daily.dev/posts/huge-binaries-papercuts-and-limits-zza8ns6n8) · Farid Zakaria’s Blog · 0 upvotes · 0 comments
- [foreign-dlopen: call dlopen from static programs](https://daily.dev/posts/foreign-dlopen-call-dlopen-from-static-programs-rioatomxw) · Lobsters · 0 upvotes · 0 comments

---

Tags: [#swift](https://daily.dev/tags/swift)

[View this post on daily.dev](https://daily.dev/posts/the-catalog-what-a-library-promises-when-it-lets-you-check-something-out-sfis3aw2c)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The Catalog: What a Library Promises When It Lets You Check Something Out","url":"https://daily.dev/posts/the-catalog-what-a-library-promises-when-it-lets-you-check-something-out-sfis3aw2c","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-catalog-what-a-library-promises-when-it-lets-you-check-something-out-sfis3aw2c"},"datePublished":"2026-10-27T17:45:16.634Z","dateModified":"2026-10-27T18:23:29.953Z","description":"Export tables, name decoration, and linker machinery form the visible part of the ABI, the contract a shared library publishes so a call can find its way to...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f820d55957d2001b4cff0a92ee0c95d1?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f820d55957d2001b4cff0a92ee0c95d1?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Speaking in Swift","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Speaking in Swift","logo":"https://media.daily.dev/image/upload/s--PL1-ztY---/f_auto/v1716620278/logos/speakinginswift","url":"https://daily.dev/sources/speakinginswift"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/the-catalog-what-a-library-promises-when-it-lets-you-check-something-out-sfis3aw2c","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"swift","timeRequired":"PT65M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Speaking in Swift","item":"https://daily.dev/sources/speakinginswift"},{"@type":"ListItem","position":3,"name":"The Catalog: What a Library Promises When It Lets You Check Something Out"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/the-catalog-what-a-library-promises-when-it-lets-you-check-something-out-sfis3aw2c#faq","mainEntity":[{"@type":"Question","name":"Why does a single Windows DLL have a maximum number of exported functions?","acceptedAnswer":{"@type":"Answer","text":"The PE export directory encodes each ordinal as a 16-bit number, giving 65,536 possible positions, so a single DLL can publish on the order of 64,000 exports through its Export Address Table. This ceiling is rarely hit in practice, since it would take tens of thousands of distinct public entry points in one module to approach it, but it is structural and forces monolithic or template-heavy libraries to split across multiple DLLs. Track PE format limits like this on daily.dev before they bite during a DLL split or refactor."}},{"@type":"Question","name":"Why did Swift change its name mangling prefix from _T to $s?","acceptedAnswer":{"@type":"Answer","text":"Swift's mangling scheme moved through several prefixes as the ABI evolved: the original Itanium-style _T, lengthened to _T0 in Swift 4.0, then $S in Swift 4.2, and finally $s once the ABI stabilized in Swift 5, with $e reserved for Embedded Swift. Each distinct prefix lets tools identify which mangling version they're reading, which mattered while the scheme was still changing. Developers debugging Swift symbol names can keep ABI mangling history handy on daily.dev."}},{"@type":"Question","name":"What is the difference between how ELF and Mach-O store a shared library's exported symbols?","acceptedAnswer":{"@type":"Answer","text":"ELF's dynamic symbol table (.dynsym) is a flat table where everything is exported unless explicitly hidden, while Mach-O stores exports as a trie (prefix tree) keyed on the characters of the decorated name under the LC_DYLD_EXPORTS_TRIE load command. The trie shares common prefixes like Swift's '$s' and module name once across all symbols, making lookup O(name length) rather than O(symbol count), which is much smaller and faster for frameworks exporting tens of thousands of Swift symbols. Engineers comparing binary formats across platforms can follow deep ABI breakdowns like this on daily.dev."}}]}
```

