mirror of
https://github.com/golang/go
synced 2024-11-25 08:07:57 -07:00
4e2aa9bff0
The Plan 9 symbol table format defines big-endian symbol values for portability, but we want to be able to generate an ELF object file and let the host linker link it, as part of the solution to issue 4069. The symbol table itself, since it is loaded into memory at run time, must be filled in by the final host linker, using relocation directives to set the symbol values. On a little-endian machine, the linker will only fill in little-endian values during relocation, so we are forced to use little-endian symbol values. To preserve most of the original portability of the symbol table format, we make the table itself say whether it uses big- or little-endian values. If the table begins with the magic sequence fe ff ff ff 00 00 then the actual table begins after those six bytes and contains little-endian symbol values. Otherwise, the table is in the original format and contains big-endian symbol values. The magic sequence looks like an "end of table" entry (the fifth byte is zero), so legacy readers will see a little-endian table as an empty table. All the gc architectures are little-endian today, so the practical effect of this CL is to make all the generated tables little-endian, but if a big-endian system comes along, ld will not generate the magic sequence, and the various readers will fall back to the original big-endian interpretation. R=ken2 CC=golang-dev https://golang.org/cl/7066043 |
||
---|---|---|
.. | ||
articles | ||
codewalk | ||
devel | ||
gopher | ||
play | ||
progs | ||
cmd.html | ||
code.html | ||
contrib.html | ||
contribute.html | ||
debugging_with_gdb.html | ||
docs.html | ||
effective_go.html | ||
gccgo_contribute.html | ||
gccgo_install.html | ||
go1.1.html | ||
go1.html | ||
go1compat.html | ||
go_faq.html | ||
go_mem.html | ||
go_spec.html | ||
go-logo-black.png | ||
go-logo-blue.png | ||
go-logo-white.png | ||
godocs.js | ||
help.html | ||
ie.css | ||
install-source.html | ||
install.html | ||
jquery.js | ||
logo-153x55.png | ||
Makefile | ||
reference.html | ||
root.html | ||
share.png | ||
sieve.gif | ||
style.css | ||
tos.html |