[Bug target/81490] x86: Handling of symbol ranges for __seg_fs/__seg_gs
hpa at zytor dot com
gcc-bugzilla@gcc.gnu.org
Thu Jul 20 04:13:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81490
--- Comment #7 from H. Peter Anvin <hpa at zytor dot com> ---
Thinking about this some more, this is really not an aspect of __seg_* but
rather the section the symbol is placed in. An embedded system kernel, for
example, could quite possibly want to access an absolute section while the
kernel itself is position-independent; maybe it is even running XIP.
As such perhaps a better solution would be to have attributes that control
these specific parameters. A quick off-the-top-of-my-head proposal:
__attribute__((absolute))
... this symbol should be accessed using absolute address references.
__attribute__((range(from,to)))
... specifies the valid address range for this symbol.
More information about the Gcc-bugs
mailing list