Named bss sections

Jeffrey A Law law@hurl.cygnus.com
Mon Sep 8 07:58:00 GMT 1997


  In message < 199709081205.OAA28412@lslsun17.epfl.ch >you write:
  > When you work with embedded targets,
[ ... ]
Yup.  No doubt I deal with this regularly.

  > GCC has provision to put global and static variables in user
  > specified sections using the section attribute, and though it
  > says in the manual that it should only be used for initialized
  > variables, I see no hard reason for this restriction.
Agreed in principle.

  > Basically, I want to be able to specify a section for any variable,
  > not only initialized ones.  For example, if a variable represents
  > some input port mapped in RAM, it would be wrong to have to initialize
  > it to some value.
I'll ask my question another way :-)  Show me a variable declaration that
specifies a specific section, but doesn't end up where it belongs and is
fixed by your patch.

jeff



More information about the Gcc mailing list