MCPcopy Index your code
hub / github.com/emilyalbini/plinky

github.com/emilyalbini/plinky @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,347 symbols 3,430 edges 191 files 10 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

plinky

[!CAUTION]

This is just a fun side project of mine. It is probably broken. I don't intend to provide any support or compatibility guarantee for it, nor accept third party contributors. Use it at your own risk.

plinky is an x86 and x86-64 ELF linker targeting Linux systems you probably should not use.

This is a side project of mine, with the goal of better understanding how linkers work. I am learning the world of linkers as I develop this, so parts of the implementation are probably incorrect or badly architected.

As an additional challenge for me, I am trying to develop plinky without relying on third party dependencies in build scripts and runtime code (dependency in tests are fine), because why not.

Licensed under either of Apache License, Version 2.0 or MIT License, at your option.

Known differences with GNU ld

  • The lack of an entry point will result in an error, instead of following GNU ld's behavior of setting it to the first byte of .text, or to 0 if no such section exists.

  • The stack is marked as non-executable by default, and it can be set back to executable with -z execstack. Because of this, the presence or lack of a .note.GNU-stack section is ignored, and -z noexecstack does nothing. This follows LLD's behavior.

Extension points exported contracts — how you extend this code

Step (Interface)
(no doc) [10 implementers]
plinky_test_harness/src/steps/mod.rs
Widget (Interface)
(no doc) [8 implementers]
plinky_diagnostics/src/widgets/mod.rs
Quote (Interface)
(no doc) [9 implementers]
plinky_utils/src/quote.rs
SymbolsView (Interface)
(no doc) [4 implementers]
plinky/src/repr/symbols/views.rs
Resolvable (Interface)
(no doc) [2 implementers]
plinky_pkg_config/src/template.rs
SectionMetadata (Interface)
(no doc) [2 implementers]
plinky_elf/src/reader/sections/reader.rs
TokenTreeExt (Interface)
(no doc) [1 implementers]
plinky_macros/src/parser/utils.rs
FromValue (Interface)
(no doc) [3 implementers]
plinky_test_harness/src/template/functions.rs

Core symbols most depended-on inside this repo

push
called by 258
plinky_diagnostics/src/writer.rs
iter
called by 139
plinky/src/repr/segments.rs
clone
called by 115
plinky/src/interner.rs
push_str
called by 66
plinky_diagnostics/src/writer.rs
len
called by 62
plinky_elf/src/types/string_table.rs
expect
called by 55
plinky_test_harness/src/template/parser.rs
span
called by 54
plinky_macros/src/error.rs
get
called by 50
plinky/src/passes/load_inputs/strings.rs

Shape

Method 526
Function 428
Class 227
Enum 144
Interface 22

Languages

Rust98%
C2%

Modules by API surface

plinky/src/cli/tests.rs65 symbols
plinky_elf/src/types/mod.rs48 symbols
plinky/src/repr/sections.rs36 symbols
plinky_test_harness/src/template/parser.rs30 symbols
plinky_ar/src/reader.rs29 symbols
plinky_test_harness/src/template/mod.rs26 symbols
plinky_elf/src/reader/dynamic.rs26 symbols
plinky/src/utils/x86_codegen.rs26 symbols
plinky_pkg_config/src/lexer.rs25 symbols
plinky_macros/src/parser/types.rs23 symbols
plinky_elf/src/writer/mod.rs23 symbols
plinky_utils/src/raw_types.rs22 symbols

For agents

$ claude mcp add plinky \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact