ELF\_FILL(3) Libelf Programmer's Manual ELF\_FILL(3)

# [NAME](#NAME)

elf\_fill - Set fill byte used when constructing or editing ELF object files.

# [SYNOPSIS](#SYNOPSIS)

```
#include <libelf.h>
void elf_fill(int fill);
```

# [DESCRIPTION](#DESCRIPTION)

The **elf\_fill** function sets the fill byte used by libelf to pad new gaps between ELF sections or data elements when an ELF object file is resized or realigned using **elf\_update**. The default fill byte used by libelf is zero.

# [PARAMETERS](#PARAMETERS)

[*fill*](#fill)

The value used to fill gaps in future writes to ELF objects. This value should be between 0 and 255 (inclusive). Only the least significant 8 bits are used.

# [RETURN VALUE](#RETURN_VALUE)

**elf\_fill** returns no value.

# [SEE ALSO](#SEE_ALSO)

[**elf\_update**(3)](/man/os/elfutils/elf_update.3), [**libelf**(3)](/man/os/elfutils/libelf.3), [**elf**(5)](/man/os/elfutils/elf.5)

# [ATTRIBUTES](#ATTRIBUTES)

For an explanation of the terms used in this section, see [**attributes**(7)](/man/os/elfutils/attributes.7).

**Interface** **Attribute** **Value** elf\_fill () Thread safety MT-Unsafe race

# [REPORTING BUGS](#REPORTING_BUGS)

Report bugs to &lt;elfutils-devel@sourceware.org&gt; or https://sourceware.org/bugzilla/.

2025-03-31 Libelf

---

Document: elf_fill(3) from elfutils 0.197-r0 (Chainguard OS)
Source: https://sourceware.org/git/elfutils.git
