kit

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

11_data_sections.c (315B)


      1 /* Exercises -fdata-sections: each global variable lands in its own
      2  * .data.<name> section.  The roundtrip must preserve each section
      3  * independently with the correct size, alignment, and AW flags. */
      4 
      5 int var_a = 1;
      6 int var_b = 2;
      7 long var_long = 3;
      8 
      9 int sum_vars(void) { return var_a + var_b + (int)var_long; }