Creating a variable under specific section

25 Views Asked by At

I'm using linker .ld file to create a section called SECVAR

  .SECVAR : {
    *(.SECVAR )
  }

using the below command in my .c file to create a variable called Dummy under section:

unsigned short Dummy __attribute__((section(".SECVAR")))

After compiling it by using MinGW compiler the generated output.map file has no variable called Dummy under the section name SECVAR

How to correctly create a variable under section?

0

There are 0 best solutions below