-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new(contrib): add elftoolchain fork readme
Signed-off-by: Luca Guerra <[email protected]>
- Loading branch information
1 parent
8bfe9dd
commit efc198f
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Contrib directory | ||
|
||
This directory contains forks of some projects that may not be included as-is and require custom patches. | ||
|
||
## Elftoolchain | ||
|
||
This is the version of Elftoolchain (https://sourceforge.net/projects/elftoolchain/) that is used to satisfy the `libelf` requirement of the Falco libraries and its dependent `libbpf`. | ||
|
||
This is how this fork was created: | ||
|
||
* We downloaded the code from https://sourceforge.net/projects/elftoolchain/ | ||
* We precompiled the autogenerated files by running: | ||
|
||
```sh | ||
cd common/sys | ||
m4 -I$(pwd) -D SRCDIR=$(pwd) elfdefinitions.m4 > elfdefinitions.h | ||
cd ../../libelf | ||
m4 -D SRCDIR=$(pwd) libelf_fsize.m4 > libelf_fsize.c | ||
m4 -D SRCDIR=$(pwd) libelf_msize.m4 > libelf_msize.c | ||
m4 -D SRCDIR=$(pwd) libelf_convert.m4 > libelf_convert.c | ||
``` | ||
|
||
* We wrote `CMakeLists.txt` and `libelf/CMakeLists.txt` to enable CMake to build `libelf` | ||
* We added compatibility patches `elf.h`, `gelf_getnote.c`, `gelf_versym.c` and modified `gelf.h`, `libelf.h` to make this flavor of libelf work with libbpf | ||
* This way, a new target `elf` is built and can be linked via `target_link_libraries()` |