kit

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

attr_p2_06_section_var.c (437B)


      1 /* Phase 2: section("name") on a file-scope variable places it in the
      2  * named section. Verifying section placement requires reading the
      3  * emitted object; here we only confirm the program compiles and the
      4  * variable is reachable at runtime. The .o-inspecting integration check
      5  * lives in a separate harness extension (TODO Phase 2). */
      6 int v __attribute__((section(".data.kit_attr_test"))) = 7;
      7 
      8 int test_main(void) { return v - 7; }