The globals
end,
etext and
edata are program segment end addresses.
etext is located at the first address after the end of the text segment.
edata is located at the first address after the end of the initialized data segment.
end is located at the first address after the end of the data segment (BSS) when the program is loaded. Use the
sbrk(2) system call with zero as its argument to find the current end of the data segment.