ELF_CLONE(3)
π ELF_CLONE(3) π
ok so bestie, welcome to the Libelf Programmer's Manual β yes, the Libelf one, the elf-coded library of your dreams π
this page is about elf_clone, and it's gonna be quick, but we're gonna make it cute.
πΈ NAME πΈ
elf_clone β Create a clone of an existing ELF descriptor.
no cap, that's the whole pitch. a clone. of an ELF descriptor. the way that a function can just duplicate the vibe of an ELF descriptor and call it a day? iconic. β¨
π¦ SYNOPSIS π¦
#include <libelf.h>
Elf *elf_clone (int filedes, Elf_Cmd cmd);
okay so first you gotta pull in the header, obviously:
#include <libelf.h>
and then the function itself, fr fr:
Elf *elf_clone (int filedes, Elf_Cmd cmd);
two things going in β an int filedes and an Elf_Cmd cmd β and one Elf * coming back out at you. it's giving "give me the ingredients, I'll hand you the dish." π
π DESCRIPTION π
so here's the thing, bestie. the elf_clone() β¦
and that's it. that's the sentence. the page just ends mid-thought, like a text you sent at 2am and never finished. π
the DESCRIPTION section here literally says The elf_clone() and then nothing else follows. no follow-up paragraph, no list of what filedes means, no breakdown of what cmd does, no note about the return value, no errors, no warnings. nothing. just vibes and a trailing open parenthesis energy.
π do not come for me β I'm not gonna make stuff up. whatever elf_clone() actually does beyond "Create a clone of an existing ELF descriptor" is not written on this page, and I'm not about to invent lore that isn't in the source material. that's a whole different genre of problem.
what we do know, and what you should hold onto like your iced coffee on a hot day:
- the function is called
elf_clone - it creates a clone of an existing ELF descriptor
- it lives in
<libelf.h> - it takes an
int filedesand anElf_Cmd cmd - it returns an
Elf *
and honestly? that's the full tea. π« anything else is fanfiction and I refuse to write it into a manpage. π§
π sign-off π
this little page came from the Libelf manual, dated 2017-09-05 β yes, 2017, the manpage is a vintage and we respect our elders π it's serving ELF_CLONE(3) in the Libelf Programmer's Manual, and it's short, but it's ours.
stay cloned, stay iconic, and if the DESCRIPTION ever gets finished, bestie, we will be so ready. β¨π
π¦ where this page comes from
- alpine 3.22: elfutils-doc 0.193-r0 Β· GPL-3.0-or-later AND ( GPL-2.0-or-later OR LGPL-3.0-or-later )
- alpine 3.23: elfutils-doc 0.194-r0 Β· GPL-3.0-or-later AND ( GPL-2.0-or-later OR LGPL-3.0-or-later )
- alpine 3.24: elfutils-doc 0.195-r0 Β· GPL-3.0-or-later AND ( GPL-2.0-or-later OR LGPL-3.0-or-later )
- arch rolling: libelf 0.196-1
- arch rolling: libelf 0.197-1 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- centos-stream 10: elfutils-libelf-devel 0.197-1.el10 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- centos-stream 9: elfutils-libelf-devel 0.197-1.el9 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- centos-stream 9: elfutils-libelf-devel 0.197-1.el9 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- debian bookworm: libelf-dev 0.188-2.1 Β· GPL-3.0-or-later
- debian trixie: libelf-dev 0.192-4 Β· GPL-3.0-or-later
- fedora 43: elfutils-libelf-devel 0.193-3.fc43 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- fedora 43: elfutils-libelf-devel 0.193-3.fc43 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- fedora 43: elfutils-libelf-devel 0.196-1.fc43
- fedora 43: elfutils-libelf-devel 0.196-1.fc43
- fedora 43: elfutils-libelf-devel 0.197-1.fc43 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- fedora 43: elfutils-libelf-devel 0.197-1.fc43 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- fedora 44: elfutils-libelf-devel 0.194-5.fc44 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- fedora 44: elfutils-libelf-devel 0.194-5.fc44 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- fedora 44: elfutils-libelf-devel 0.196-1.fc44
- fedora 44: elfutils-libelf-devel 0.196-1.fc44
- fedora 44: elfutils-libelf-devel 0.197-1.fc44 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- fedora 44: elfutils-libelf-devel 0.197-1.fc44 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- nixos 26.05: elfutils 0.194
- nixpkgs unstable: elfutils 0.195
- opensuse-leap 16.0: libelf-devel 0.192-160000.3.1 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- opensuse-leap 16.0: libelf-devel 0.192-160000.3.1 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- opensuse-leap 16.0: libelf-devel 0.192-160000.3.1 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- opensuse-leap 16.0: libelf-devel 0.192-160000.3.1 Β· GPL-2.0-or-later OR LGPL-3.0-or-later
- ubuntu jammy: libelf-dev 0.186-1build1
- ubuntu jammy: libelf-dev 0.186-1ubuntu0.1
- ubuntu noble: libelf-dev 0.190-1.1build4 Β· GPL-3.0-or-later
- ubuntu noble: libelf-dev 0.190-1.1ubuntu0.1 Β· GPL-3.0-or-later
- ubuntu questing: libelf-dev 0.193-1
- ubuntu resolute: libelf-dev 0.194-4 Β· GPL-3.0-or-later
- ubuntu stonking: libelf-dev 0.196-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms