This is patch-3.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
There is another solution that is similar to Darwin, so no linker script is needed. I will update the patch to go that route.
From Ian Taylor:
"When a section name is a valid C identifier, the linker automatically provides start and stop symbols set to the addresses of the beginning and end of the section. The symbols are start_SECNAME and stop_SECNAME where SECNAME is the name of the section.
This is not defined by the ELF ABI, but it is completely reliable on
GNU/Linux. In fact it is reliable on any ELF system except possibly
Solaris, and it probably works on Solaris too. This is definitely
what you should do instead of using a linker script. It's more
reliable and more efficient, and it's what everybody else does"