mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link: collect itablinks as a slice in moduledata
See #14874 This change tells the linker to collect all the itablink symbols and collect them so that moduledata can have a slice of all compiler generated itabs. The logic is shamelessly adapted from what is done with typelink symbols. Change-Id: Ie93b59acf0fcba908a876d506afbf796f222dbac Reviewed-on: https://go-review.googlesource.com/20889 Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
f00bbd5f81
commit
79688ca58f
9 changed files with 52 additions and 5 deletions
|
|
@ -1740,6 +1740,7 @@ func doelf() {
|
|||
relro_prefix = ".data.rel.ro"
|
||||
}
|
||||
Addstring(shstrtab, relro_prefix+".typelink")
|
||||
Addstring(shstrtab, relro_prefix+".itablink")
|
||||
Addstring(shstrtab, relro_prefix+".gosymtab")
|
||||
Addstring(shstrtab, relro_prefix+".gopclntab")
|
||||
|
||||
|
|
@ -1751,6 +1752,7 @@ func doelf() {
|
|||
Addstring(shstrtab, ".rela.text")
|
||||
Addstring(shstrtab, ".rela.rodata")
|
||||
Addstring(shstrtab, ".rela"+relro_prefix+".typelink")
|
||||
Addstring(shstrtab, ".rela"+relro_prefix+".itablink")
|
||||
Addstring(shstrtab, ".rela"+relro_prefix+".gosymtab")
|
||||
Addstring(shstrtab, ".rela"+relro_prefix+".gopclntab")
|
||||
Addstring(shstrtab, ".rela.noptrdata")
|
||||
|
|
@ -1763,6 +1765,7 @@ func doelf() {
|
|||
Addstring(shstrtab, ".rel.text")
|
||||
Addstring(shstrtab, ".rel.rodata")
|
||||
Addstring(shstrtab, ".rel"+relro_prefix+".typelink")
|
||||
Addstring(shstrtab, ".rel"+relro_prefix+".itablink")
|
||||
Addstring(shstrtab, ".rel"+relro_prefix+".gosymtab")
|
||||
Addstring(shstrtab, ".rel"+relro_prefix+".gopclntab")
|
||||
Addstring(shstrtab, ".rel.noptrdata")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue