Loading…
CppCon 2019 has ended
Monday, September 16 • 15:15 - 16:15
Using Freestanding C++ to add C++17 to your Shellcode, UEFI, Embedded Systems and Unikernels.

Log in to save this to your schedule and see who's attending!

This presentation is a must-see if you would like to learn how C++ works under the hood or how to include the Standard Library when compiling with "-ffreestanding". In this presentation, we will examine how C++ works behind the scenes as well as how to include C++ and the Standard Library in freestanding environments. Such environments include shellcode, UEFI, embedded systems (with no OS available), and unikernels. There are many environments where an OS is not present, or the facilities of the OS are inaccessible (for example with shellcode). In these environments, one compiles C/C++ with "-ffreestanding" to produce an executable with no external dependencies. The downside to this approach is the Standard Library is also not accessible, meaning useful functions such as std::unique_ptr, std::mutex, and std::list are not available. Furthermore, some core language facilities such as std::move, std::forward, and dynamic_cast are also unavailable as the Standard Library implements these.

This presentation teaches the audience how to overcome these problems by leveraging Libc++ from LLVM and Newlib to create a working, freestanding C++ environment with support for the Standard Library. Topics presented include how to compile a static, position independent executable (also called a static PIE) with support for C++ and the Standard Library, how to execute your project in a freestanding environment and what the limitations are and how to overcome them. Finally, this presentation will conclude with a demonstration of a UEFI application written in C++ as well as a demonstration of leveraging C++ in shellcode.

Speakers
avatar for Rian Quinn

Rian Quinn

CTO, Assured Information Security, Inc.
Dr. Rian Quinn is a Senior Principal Investigator in the Trusted Information Systems Group at Assured Information Security, Inc. were he has focused on trusted computing and hypervisor related technologies for nearly 10 years. He holds a Ph.D. in Computer Engineering with specializations... Read More →


Monday September 16, 2019 15:15 - 16:15
Crest 3

Attendees (93)




Twitter Feed