Skip to content

Commit

Permalink
export text region range
Browse files Browse the repository at this point in the history
  • Loading branch information
abarisani committed Aug 13, 2024
1 parent 82b9412 commit ec6194f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/runtime/os_tamago_arm.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ func MemRegion() (start uint32, end uint32) {
return ramStart, ramStart + ramSize
}

// TextRegion returns the start and end addresses of the physical RAM
// containing the Go runtime executable instructions.
func TextRegion() (start uint32, end uint32) {
return uint32(firstmoduledata.text), uint32(firstmoduledata.etext)
}

// stubs for unused/unimplemented functionality
type mOS struct{}
type sigset struct{}
Expand Down
6 changes: 6 additions & 0 deletions src/runtime/os_tamago_riscv64.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ func MemRegion() (start uint64, end uint64) {
return ramStart, ramStart + ramSize
}

// TextRegion returns the start and end addresses of the physical RAM
// containing the Go runtime executable instructions.
func TextRegion() (start uint64, end uint64) {
return uint64(firstmoduledata.text), uint64(firstmoduledata.etext)
}

// stubs for unused/unimplemented functionality
type mOS struct{}
type sigset struct{}
Expand Down

0 comments on commit ec6194f

Please sign in to comment.