Sorry for perhaps extending the specific question to a more generic
one. In which cases shall we, in current or future development,
prevent gcc from knowing a pointer-addition in the way RELOC_HIDE? And
in what cases shall we just write pure C point addition?
After all, we are writing an OS in C not in pure assembly, so I am
just trying to learn some generial rules to mimize the raw assembly in
development.
Feng,Dong
2006/8/25, Paul Mackerras <[email protected]>:
Christoph Lameter writes:
No, RELOC_HIDE came from ppc originally. The reason for it is that
gcc assumes that if you add something on to the address of a symbol,
the resulting address is still inside the bounds of the symbol, and do
optimizations based on that. The RELOC_HIDE macro is designed to
prevent gcc knowing that the resulting pointer is obtained by adding
an offset to the address of a symbol. As far as gcc knows, the
resulting pointer could point to anything.
It has nothing to do with linker relocations.
Paul.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]