kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

10_func_sections.c (339B)


      1 /* Exercises -ffunction-sections: each function lands in its own
      2  * .text.<name> section.  The roundtrip must preserve all three sections
      3  * with their individual sizes, flags (AX), and the CALL26 reloc
      4  * from fn_c into fn_a / fn_b. */
      5 
      6 int fn_a(void) { return 1; }
      7 int fn_b(void) { return 2; }
      8 int fn_c(void) { return fn_a() + fn_b(); }