Skip to content

Commit

Permalink
cmd/internal: support -buildmode=c-shared on linux/mips64le
Browse files Browse the repository at this point in the history
For golang#43264

Signed-off-by: Xiaodong Liu <liuxiaodong@loongson.cn>
  • Loading branch information
XiaodongLoong committed Aug 2, 2021
1 parent b8ca6e5 commit 5a86176
Show file tree
Hide file tree
Showing 7 changed files with 489 additions and 62 deletions.
13 changes: 12 additions & 1 deletion src/cmd/internal/obj/mips/a.out.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,16 +301,27 @@ const (
C_STCON /* $tlsvar */
C_SBRA
C_LBRA
C_LOBRA /* PIC call or jump to offset */
C_SYMBRA /* PIC call or jump to GOT sym */
C_SAUTO
C_LAUTO
C_SEXT
C_LEXT
C_ZOREG
C_SHZOREG /* PIC call to register without offset */
C_SOREG
C_LOREG
C_GOK
C_ADDR
C_TLS
C_GOTADDR /* for GOT sym */
C_GOTREF

// TLS "var" in local exec mode: will become a constant offset from
// thread local base that is ultimately chosen by the program linker.
C_TLS_LE

C_TLS_GD

C_TEXTSIZE

C_NCLASS /* must be the last */
Expand Down
8 changes: 7 additions & 1 deletion src/cmd/internal/obj/mips/anames0.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,22 @@ var cnames0 = []string{
"STCON",
"SBRA",
"LBRA",
"LOBRA",
"SYMBRA",
"SAUTO",
"LAUTO",
"SEXT",
"LEXT",
"ZOREG",
"SHZOREG",
"SOREG",
"LOREG",
"GOK",
"ADDR",
"TLS",
"GOTADDR",
"GOTREF",
"TLS_LE",
"TLS_GD",
"TEXTSIZE",
"NCLASS",
}
Loading

0 comments on commit 5a86176

Please sign in to comment.