1
2
3
4
5 package wasm
6
7 import (
8 "cmd/internal/sys"
9 "cmd/link/internal/ld"
10 )
11
12 func Init() (*sys.Arch, ld.Arch) {
13 theArch := ld.Arch{
14 Funcalign: 16,
15 Maxalign: 32,
16 Minalign: 1,
17
18 Archinit: archinit,
19 AssignAddress: assignAddress,
20 Asmb: asmb,
21 Asmb2: asmb2,
22 Gentext: gentext,
23 }
24
25 return sys.ArchWasm, theArch
26 }
27
28 func archinit(ctxt *ld.Link) {
29 if *ld.FlagRound == -1 {
30 *ld.FlagRound = 4096
31 }
32 if *ld.FlagTextAddr == -1 {
33 *ld.FlagTextAddr = 0
34 }
35 }
36
View as plain text