[dev.link] cmd/link: better naming for Loader container/subsym methods, part 1 of 2

Introduce a new loader method "AddInteriorSym" to be used when
establishing container/containee symbol relationships for host object
sub-symbols and GOT/dynamic sub-symbols.

Interior symbols are employed in situations where you have a
"container" or "payload" symbol that has content, and then a series of
"interior" sub-symbols that point into a portion of the container
symbol's content. Each interior symbol will typically have a useful
name / size / value, but no content of its own. From a symbol table
perspective the container symbol is anonymous, but the interior
symbols are added to the output symbol table.

Change-Id: I919ed5dbbfe2ef2c9a76214f7ea9b384a1be6297
Reviewed-on: https://go-review.googlesource.com/c/go/+/240508
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
This commit is contained in:
Than McIntosh 2020-06-30 11:30:28 -04:00
parent 8c46cb1bf5
commit 3c3cc19564
9 changed files with 57 additions and 30 deletions

View file

@ -240,8 +240,8 @@ func (sb *SymbolBuilder) SortSub() {
sb.l.SortSub(sb.symIdx)
}
func (sb *SymbolBuilder) PrependSub(sub Sym) {
sb.l.PrependSub(sb.symIdx, sub)
func (sb *SymbolBuilder) AddInteriorSym(sub Sym) {
sb.l.AddInteriorSym(sb.symIdx, sub)
}
func (sb *SymbolBuilder) AddUint8(v uint8) int64 {