Closed
Description
| Bugzilla Link | 22906 |
| Resolution | FIXED |
| Resolved on | Feb 25, 2016 02:55 |
| Version | unspecified |
| OS | All |
| Blocks | #23588 |
| CC | @emaste |
Extended Description
GNU ld supports the magic __start and __stop symbols as markers for the beginning/end of sections. For example:
int var1 attribute((section("foo")));
int var2 attribute((section("foo")));
extern int __start_foo[0];
extern int __stop_foo[0];
GNU ld automatically adds these symbols if undefined. They will point to the beginning/end of the section "foo". Couple of important things to keep in mind when implementing this:
- Don't let --gc-sections reap these sections if __start_foo and __stop_foo are being used.
- Don't inject these symbols if the section itself does not exist.
GNU ld also doesn't do this.
Activity