Next: PROVIDE, Previous: Simple Assignments, Up: Assigning Values to Symbols [Contents][Index]
For ELF targeted ports, define a symbol that will be hidden and won’t be
exported. The syntax is HIDDEN(symbol = expression)
.
Here is the example from Simple Assignments, rewritten to use
HIDDEN
:
HIDDEN(floating_point = 0); SECTIONS { .text : { *(.text) HIDDEN(_etext = .); } HIDDEN(_bdata = (. + 3) & ~ 3); .data : { *(.data) } }
In this case none of the three symbols will be visible outside this module.