Skip to content

Instantly share code, notes, and snippets.

#include <elfio/elfio.hpp>
int main(int argc, char **argv)
{
ELFIO::elfio elf;
if (!elf.load("/usr/bin/ls")) {
std::cerr << "Error loading binary" << std::endl;
exit(1);
}
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//