Using Freestanding C++ for C++17 in Shellcode, UEFI, Embedded & Unikernels
summary
Shows how to run full C++17 with libc++ and Newlib in freestanding environments by building a static PIE toolchain and a custom ELF header-only loader that injects an ELF image at runtime, plus a table-based unwinder and C runtime shims. Demonstrates a UEFI hello‑world and a shellcode demo that loads and executes a statically linked C++ binary from a buffer (it works), currently x86_64 only with no shared‑lib support.
AI-written summary · about
chapters (15)
- 0:00Introduction and goals
- 1:13Freestanding C++ explained
- 5:07Compiler flags and setup
- 12:40Missing runtime support
- 16:09Bareflank hypervisor approach
- 18:35C++ loader concept
- 20:00Hello world demo
- 22:30UEFI application example
- 33:21Shellcode demo setup
- 37:47Buffer overflow basics
- 40:20Shellcode payload details
- 46:08Live shellcode attack demo
- 48:34Limitations and future work
- 50:52Q&A on exception handling
- 53:27Q&A on system calls
related talks
30m"UEFI Applications With Modern C++"
01h 03mBootable applications - an introduction
32mOpen Source C/C++ Embedded Toolchains Using LLVM
01h 11mC++ in the World of Embedded Systems
52mC++ for Embedded Development
58m“Deconstructing the OS: The devil’s In the side effects”
12mLibc++ on Linux - using the example of Oniro
01h 08mKeynote: What can C++ do for embedded systems developers?
