1
0
mirror of https://github.com/golang/go synced 2024-10-04 05:21:22 -06:00
go/src/libmach
Russ Cox 19fd5c787f 5l, 6l, 8l: link pclntab and symtab as ordinary rodata symbols
That is, move the pc/ln table and the symbol table
into the read-only data segment.  This eliminates
the need for a special load command to map the
symbol table into memory, which makes the
information available on systems that couldn't handle
the magic load to 0x99000000, like NaCl and ARM QEMU
and Linux without config_highmem=y.  It also
eliminates an #ifdef and some clumsy code to
find the symbol table on Windows.

The bad news is that the binary appears to be bigger
than it used to be.  This is not actually the case, though:
the same amount of data is being mapped into memory
as before, and the tables are still read-only, so they're
still shared across multiple instances of the binary as
they were before.  The difference is just that the tables
aren't squirreled away in some section that "size" doesn't
know to look at.

This is a checkpoint.
It probably breaks Windows and breaks NaCl more
than it used to be broken, but those will be fixed.
The logic involving -s needs to be revisited too.

Fixes #871.

R=ken2
CC=golang-dev
https://golang.org/cl/2587041
2010-10-19 18:07:19 -04:00
..
5.c support for 5.out files 2009-10-19 22:33:56 -07:00
5db.c support for 5.out files 2009-10-19 22:33:56 -07:00
5obj.c libmach: correct handling of .5 files with D_REGREG addresses 2010-07-22 09:00:34 -07:00
6.c rename libmach_amd64 libmach 2009-08-14 10:46:04 -07:00
6obj.c rename libmach_amd64 libmach 2009-08-14 10:46:04 -07:00
8.c rename libmach_amd64 libmach 2009-08-14 10:46:04 -07:00
8db.c libmach: fix build on arm host 2010-09-15 16:52:11 -04:00
8obj.c fix build after Mercurial move. 2009-10-22 10:59:27 -07:00
access.c rename libmach_amd64 libmach 2009-08-14 10:46:04 -07:00
darwin.c libmach: more info when memory reads fail on Darwin 2010-03-20 22:37:23 -07:00
elf.h rename libmach_amd64 libmach 2009-08-14 10:46:04 -07:00
executable.c 5l, 6l, 8l: link pclntab and symtab as ordinary rodata symbols 2010-10-19 18:07:19 -04:00
fakeobj.c rename libmach_amd64 libmach 2009-08-14 10:46:04 -07:00
freebsd.c FreeBSD-specific porting work. 2009-11-17 08:20:58 -08:00
linux.c libmach: fix whitespace. 2010-09-12 16:40:31 +10:00
machdata.c rename libmach_amd64 libmach 2009-08-14 10:46:04 -07:00
macho.h rename libmach_amd64 libmach 2009-08-14 10:46:04 -07:00
Makefile build: $GOBIN defaults to $GOROOT/bin 2010-08-24 20:00:33 -04:00
map.c rename libmach_amd64 libmach 2009-08-14 10:46:04 -07:00
obj.c two more if(h<0) that gcc 4.3 -O2 miscompiles 2009-11-23 14:23:14 -08:00
obj.h rename libmach_amd64 libmach 2009-08-14 10:46:04 -07:00
setmach.c support for 5.out files 2009-10-19 22:33:56 -07:00
swap.c rename libmach_amd64 libmach 2009-08-14 10:46:04 -07:00
sym.c fix bug introduced in 33293 2009-09-02 11:12:42 -07:00
windows.c cov and prof: implement windows version (just function stubs and build mods) 2010-07-30 11:47:11 +10:00