1
0
mirror of https://github.com/golang/go synced 2024-11-23 01:20:02 -07:00
go/doc
Russ Cox 4e2aa9bff0 cmd/ld: use native-endian symbol values in symbol table
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
2013-01-04 17:03:57 -05:00
..
articles doc: add race detector manual 2013-01-02 16:38:47 +04:00
codewalk doc/codewalk/markov: fix the highlight range of the step "The NewChain constructor function". 2012-10-18 08:12:44 +11:00
devel doc: Remove obsolete references to weekly releases. 2012-09-23 16:18:19 -05:00
gopher doc/gopher: add high-resolution pencil sketches 2012-12-12 10:51:13 -08:00
play doc/play: sync playground.js with go-playground repo 2012-12-13 14:32:03 +11:00
progs cmd/gc: make forward declaration in pure Go package an error 2012-12-22 16:46:46 -05:00
cmd.html doc: move /ref/cmd to /doc/cmd 2012-03-27 13:46:16 +11:00
code.html doc: link to Go coding screencast 2012-11-13 16:50:44 +01:00
contrib.html doc: Remove obsolete references to weekly releases. 2012-09-23 16:18:19 -05:00
contribute.html doc: update standard copyright header 2013-01-02 16:26:25 +11:00
debugging_with_gdb.html doc: NetBSD is fully supported now 2012-10-16 16:02:56 +08:00
docs.html doc: add race detector manual 2013-01-02 16:38:47 +04:00
effective_go.html doc/effective_go: don't use ALL_CAPS for variable names. 2012-11-08 11:55:46 +11:00
gccgo_contribute.html doc: clean up docs page, refer to wiki, change install doc paths 2012-03-05 14:31:27 +11:00
gccgo_install.html doc: general update of gccgo_install 2012-03-20 14:16:34 -07:00
go1.1.html cmd/ld: use native-endian symbol values in symbol table 2013-01-04 17:03:57 -05:00
go1.html doc: fix id attributes in links to godoc 2012-12-29 10:41:39 +11:00
go1compat.html doc: add note about import . to Go 1 compatibility notes 2012-03-06 17:50:11 -08:00
go_faq.html faq: mention go vet in "What happens with closures running as goroutines?" 2012-11-12 07:25:54 -08:00
go_mem.html doc: Don't imply incorrect guarantees about data races. 2012-09-11 08:47:30 +10:00
go_spec.html spec: clarify language about unary operator & 2013-01-02 18:11:49 -08:00
go-logo-black.png doc: pngcrush and remove old, unused images 2012-03-08 14:18:28 +11:00
go-logo-blue.png doc: pngcrush and remove old, unused images 2012-03-08 14:18:28 +11:00
go-logo-white.png doc: pngcrush and remove old, unused images 2012-03-08 14:18:28 +11:00
godocs.js doc/godoc.js: put focus on div#page when necessary 2012-10-16 14:28:18 +08:00
help.html doc: add more gophers 2012-03-06 12:50:52 +11:00
ie.css golang.org redesign 2010-09-16 14:01:02 +10:00
install-source.html doc: add important info for would-be go contributors. 2012-09-26 14:39:31 -04:00
install.html doc/install: document system requirements for the FreeBSD/ARM port 2012-11-12 12:20:42 +01:00
jquery.js godoc: add jQuery to Go repository, rewrite godocs.js to use jQuery 2012-10-04 15:31:25 +10:00
logo-153x55.png doc: pngcrush and remove old, unused images 2012-03-08 14:18:28 +11:00
Makefile doc/progs: use test/run.go for testing on Windows 2012-09-03 03:49:03 +08:00
reference.html doc: remove misplaced articles from references page 2012-10-25 11:05:42 +11:00
root.html godoc: restore toy selection to playground widget 2012-10-11 09:53:37 +11:00
share.png godoc: change link styles, add 'pop out' button 2012-03-13 11:00:11 +11:00
sieve.gif repair corrupted sieve.gif 2009-10-30 10:34:01 -07:00
style.css go/doc: hide "Program exited." message from front page playground output 2012-12-13 15:35:38 +11:00
tos.html doc: add Terms of Service 2012-03-27 09:27:43 +11:00