mirror of
https://github.com/golang/go
synced 2024-11-22 03:24:41 -07:00
6l: move mapped symbol table lower in memory
Allows binary to run on some Linux system. Fix for issue 365. R=rsc CC=golang-dev https://golang.org/cl/199096
This commit is contained in:
parent
36cd49e318
commit
8ec9ffc742
@ -68,7 +68,7 @@ asmb(void)
|
||||
int np;
|
||||
vlong va, fo, w, symo;
|
||||
int strtabsize;
|
||||
vlong symdatva = 0x99LL<<24;
|
||||
vlong symdatva = SYMDATVA;
|
||||
Optab *o;
|
||||
|
||||
strtabsize = 0;
|
||||
|
@ -439,7 +439,7 @@ asmb(void)
|
||||
int a, dynsym;
|
||||
uchar *op1;
|
||||
vlong vl, va, startva, fo, w, symo, elfsymo, elfstro, elfsymsize, machlink;
|
||||
vlong symdatva = 0x99LL<<32;
|
||||
vlong symdatva = SYMDATVA;
|
||||
ElfEhdr *eh;
|
||||
ElfPhdr *ph, *pph;
|
||||
ElfShdr *sh;
|
||||
|
@ -28,6 +28,9 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
// This magic number also defined in src/pkg/runtime/symtab.c in SYMCOUNTS
|
||||
#define SYMDATVA 0x99LL<<24
|
||||
|
||||
typedef struct Library Library;
|
||||
struct Library
|
||||
{
|
||||
|
@ -18,13 +18,8 @@
|
||||
|
||||
// TODO(rsc): Move this *under* the text segment.
|
||||
// Then define names for these addresses instead of hard-coding magic ones.
|
||||
#ifdef _64BIT
|
||||
#define SYMCOUNTS ((int32*)(0x99LL<<32)) // known to 6l
|
||||
#define SYMDATA ((byte*)(0x99LL<<32) + 8)
|
||||
#else
|
||||
#define SYMCOUNTS ((int32*)(0x99LL<<24)) // known to 8l
|
||||
#define SYMCOUNTS ((int32*)(0x99LL<<24)) // known to 6l, 8l; see src/cmd/ld/lib.h
|
||||
#define SYMDATA ((byte*)(0x99LL<<24) + 8)
|
||||
#endif
|
||||
|
||||
typedef struct Sym Sym;
|
||||
struct Sym
|
||||
|
Loading…
Reference in New Issue
Block a user