mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/internal/ld, cmd/internal/obj: delete Ctxt.Endian
Replaced by Ctxt.ByteOrder, which uses the standard binary.ByteOrder type. Change-Id: I06cec0674c153a9ad75ff937f7eb934891effd0b Reviewed-on: https://go-review.googlesource.com/6450 Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
b38fa898c6
commit
ea7be5170a
10 changed files with 13 additions and 33 deletions
|
|
@ -5,6 +5,7 @@
|
|||
package ld
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
|
@ -755,7 +756,7 @@ func Elfinit() {
|
|||
switch Thearch.Thechar {
|
||||
// 64-bit architectures
|
||||
case '9':
|
||||
if Ctxt.Arch.Endian == BigEndian {
|
||||
if Ctxt.Arch.ByteOrder == binary.BigEndian {
|
||||
ehdr.flags = 1 /* Version 1 ABI */
|
||||
} else {
|
||||
ehdr.flags = 2 /* Version 2 ABI */
|
||||
|
|
@ -2342,7 +2343,7 @@ elfobj:
|
|||
} else {
|
||||
eh.ident[EI_CLASS] = ELFCLASS32
|
||||
}
|
||||
if Ctxt.Arch.Endian == BigEndian {
|
||||
if Ctxt.Arch.ByteOrder == binary.BigEndian {
|
||||
eh.ident[EI_DATA] = ELFDATA2MSB
|
||||
} else {
|
||||
eh.ident[EI_DATA] = ELFDATA2LSB
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue