mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/internal/ld, cmd/7l: external linking support for linux/arm64
Based on Michael Hudson-Doyle's patch:
b735215ee4
Change-Id: I309e3df7608b9eef9339196fdc50dedf5f9439f0
Reviewed-on: https://go-review.googlesource.com/8437
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
a50b24c649
commit
f55b2a11f4
6 changed files with 68 additions and 23 deletions
|
|
@ -2367,12 +2367,13 @@ func dwarfaddshstrings(shstrtab *LSym) {
|
|||
elfstrdbg[ElfStrDebugStr] = Addstring(shstrtab, ".debug_str")
|
||||
elfstrdbg[ElfStrGDBScripts] = Addstring(shstrtab, ".debug_gdb_scripts")
|
||||
if Linkmode == LinkExternal {
|
||||
if Thearch.Thechar == '6' || Thearch.Thechar == '9' {
|
||||
switch Thearch.Thechar {
|
||||
case '6', '7', '9':
|
||||
elfstrdbg[ElfStrRelDebugInfo] = Addstring(shstrtab, ".rela.debug_info")
|
||||
elfstrdbg[ElfStrRelDebugAranges] = Addstring(shstrtab, ".rela.debug_aranges")
|
||||
elfstrdbg[ElfStrRelDebugLine] = Addstring(shstrtab, ".rela.debug_line")
|
||||
elfstrdbg[ElfStrRelDebugFrame] = Addstring(shstrtab, ".rela.debug_frame")
|
||||
} else {
|
||||
default:
|
||||
elfstrdbg[ElfStrRelDebugInfo] = Addstring(shstrtab, ".rel.debug_info")
|
||||
elfstrdbg[ElfStrRelDebugAranges] = Addstring(shstrtab, ".rel.debug_aranges")
|
||||
elfstrdbg[ElfStrRelDebugLine] = Addstring(shstrtab, ".rel.debug_line")
|
||||
|
|
@ -2419,9 +2420,10 @@ func dwarfaddelfsectionsyms() {
|
|||
|
||||
func dwarfaddelfrelocheader(elfstr int, shdata *ElfShdr, off int64, size int64) {
|
||||
sh := newElfShdr(elfstrdbg[elfstr])
|
||||
if Thearch.Thechar == '6' || Thearch.Thechar == '9' {
|
||||
switch Thearch.Thechar {
|
||||
case '6', '7', '9':
|
||||
sh.type_ = SHT_RELA
|
||||
} else {
|
||||
default:
|
||||
sh.type_ = SHT_REL
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue