]> Cypherpunks repositories - gostls13.git/commit
cmd/ld: move symtab, ELF generation to portable code
authorRuss Cox <rsc@golang.org>
Sun, 6 Jan 2013 19:32:45 +0000 (14:32 -0500)
committerRuss Cox <rsc@golang.org>
Sun, 6 Jan 2013 19:32:45 +0000 (14:32 -0500)
commitd37c572ad54921319653a4abdd749221f7779bb5
tree956993fba7202c74a7a512ea70777d11a1067741
parentb006cd9bb097c6b3a8cf7cebdb8067eef34957b1
cmd/ld: move symtab, ELF generation to portable code

More cleanup in preparation for fixing issue 4069.

This CL replaces the three nearly identical copies of the
asmb ELF code with a single asmbelf function in elf.c.

In addition to the ELF code movement, remove the elfstr
array in favor of a simpler lookup, and identify sections by
name throughout instead of computing fragile indices.

The CL also replaces the three nearly identical copies of the
genasmsym code with a single genasmsym function in lib.c.

The ARM linker still compiles and generates binaries,
but I haven't tested the binaries. They may not work.

R=ken2
CC=golang-dev
https://golang.org/cl/7062047
14 files changed:
src/cmd/5l/asm.c
src/cmd/5l/l.h
src/cmd/5l/span.c
src/cmd/6l/asm.c
src/cmd/6l/l.h
src/cmd/8l/asm.c
src/cmd/8l/l.h
src/cmd/ld/data.c
src/cmd/ld/elf.c
src/cmd/ld/elf.h
src/cmd/ld/go.c
src/cmd/ld/lib.c
src/cmd/ld/lib.h
src/cmd/ld/symtab.c