aboutsummaryrefslogtreecommitdiff
path: root/crt0/NOTES
blob: 666ee89027badc8dc65807e9fa8411856ddc6872 (plain)
1
2
3
4
5
6
7
8
9
10
11
To place main() at the start of the payload, use the following in the
C code:

void main(void) __attribute__ ((section ("entry")));

Then, in the ld script:

  .text : { *(.entry) *(.text*) }

That will force the single function defined in the separate section to
be at the start of code.