Ignore:
Timestamp:
Sep 18, 2024, 4:06:28 PM (4 weeks ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
59627b3
Parents:
0bda8d7
Message:

Add a sentence about linkonce

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/jiada_liang_MMath/CFAenum.tex

    r0bda8d7 rc329bca  
    157157Therefore, a \CFA enumeration variable has the same underlying representation as its generated C enumeration.
    158158This semantics implies a \CFA enumeration variable uses the same storage as a C enumeration variable, that @posn@ can use as its underlying representation, and the label and value arrays take little storage.
     159The arrays are annotated with @linkonce@, which are replaced later by gcc attribute @section(".gnu.linkonce.NAME")@, to prevent multiple definitions.
    159160It should be possible to eliminate the two arrays if unused, either by \CFA if local to a translation unit and unused, or by the linker if global but unreferenced.
    160161Also, the label and value arrays are declared @static@ and initialized with constants, so the arrays are allocated in the @.data@ section and initialized before program execution.
Note: See TracChangeset for help on using the changeset viewer.