---
name: "elf_fill"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/elf_fill"
---

# elf\_fill(3)

set fill byte for inter-section padding

## NAME

**elf\_fill** – set fill byte for inter-section padding

## LIBRARY

library “libelf”

## SYNOPSIS

**#include \<libelf.h\>**

*void*\

**elf\_fill**(*int fill*);

## DESCRIPTION

Function **elf\_fill**() allows an application to specify a fill value for the padding inserted between two sections of an ELF file to meet section alignment constraints. By default the ELF library uses zero bytes for padding.

The ELF library will only pad bytes if the ELF\_F\_LAYOUT flag is not set for the ELF file.

## SEE ALSO

[elf(3)](/elf/3.md), [elf\_flagelf(3)](/elf_flagelf/3.md), [gelf(3)](/gelf/3.md)
