link.ld - What's the meaning of the __end label?
Posted: Sat Dec 13, 2014 8:33 am
James Molloy's tutorial uses the link.ld file as copy-pasted below.
Question: what does the __end label represent?
More specifically: is it a pointer to the last byte of the binary, or in C++ STL style, to the byte after the last byte of the binary (thereby pointing "outside")?
Question: what does the __end label represent?
More specifically: is it a pointer to the last byte of the binary, or in C++ STL style, to the byte after the last byte of the binary (thereby pointing "outside")?
Code: Select all
ENTRY(start)
SECTIONS
{
.text 0x100000 :
{
code = .; _code = .; __code = .;
*(.text)
. = ALIGN(4096);
}
.data :
{
data = .; _data = .; __data = .;
*(.data)
*(.rodata)
. = ALIGN(4096);
}
.bss :
{
bss = .; _bss = .; __bss = .;
*(.bss)
. = ALIGN(4096);
}
end = .; _end = .; __end = .;
}