---
name: "end"
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/edata"
---

# end(3)

end boundaries of image segments

Part of [edata(3)](/edata/3.md).

## NAME

**end**, **etext**, **edata** – end boundaries of image segments

## SYNOPSIS

*extern* *end*; *extern* *etext*; *extern* *edata*;

## DESCRIPTION

The globals *end*, *etext* and *edata* are program segment end addresses.

*etext* is the first address after the end of the text segment.

*edata* is the first address after the end of the initialized data segment.

*end* is the first address after the end of the data segment (BSS) when the program is loaded. Use the [sbrk(2)](/sbrk/2.md) system call with zero as its argument to find the current end of the data segment.

## SEE ALSO

[sbrk(2)](/sbrk/2.md), [malloc(3)](/malloc/3.md), [a.out(5)](/a.out/5.md)

## HISTORY

An **end** manual page appeared in Version 6 AT&T UNIX.

## BUGS

Traditionally, no variable existed that pointed to the start of the text segment because the text segment always started at address zero. Although it is no longer valid to make this assumption, no variable similar to the ones documented above exists to point to the start of the text segment.
