Accessing variables from the .bss section or a section named with .usect is straightforward:
- Use the .bss or .usect directive to define the variable.
- When you use .usect, the variable is defined in a section other than .bss and therefore must be declared far in C.
- Use the .def or .global directive to make the definition external.
- Use the appropriate linkname in assembly language.
- In C/C++, declare the variable as extern and access it normally.
Example8-4 and Example8-3 show how you can access a variable defined in .bss.