On Fri, Nov 5, 2021 at 9:36 AM 'LUO Hailing' via golang-nuts
<golang-nuts@googlegroups.com> wrote:
>
> I'm new of golang linker, and I have a simple question about golang linker.
>
> PATH: go\src\cmd\link\internal\arm64\asm.go
> function:
> func elfreloc1(ctxt *ld.Link, out *ld.OutBuf, ldr *loader.Loader, s 
> loader.Sym, r loader.ExtReloc, ri int, sectoff int64) bool {
> ...
> }
>
> In this function, it only emits some types of relocations into go.o as the 
> following description. why?
> There still exist some other types of relocations.
>
> objabi.R_ADDR, objabi.R_DWARFSECREF -> elf.R_AARCH64_ABS32/elf.R_AARCH64_ABS64
> objabi.R_ADDRARM64 -> elf.R_AARCH64_ADR_PREL_PG_HI21 and 
> elf.R_AARCH64_ADD_ABS_LO12_NC
> objabi.R_ARM64_TLS_LE -> elf.R_AARCH64_TLSLE_MOVW_TPREL_G0
> objabi.R_ARM64_TLS_IE -> elf.R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 and 
> elf.R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC
> objabi.R_ARM64_GOTPCREL -> elf.R_AARCH64_ADR_GOT_PAGE and 
> elf.R_AARCH64_LD64_GOT_LO12_NC
> objabi.R_CALLARM64 -> elf.R_AARCH64_CALL26

What other relocation types actually occur in Go code?

If any do show up, the function will return false, and the call in
elfrelocsect will return an error.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcWrFORakt0tv9F%2B0ht03mXmaRm1ZdVT_z%3D6Xe%3DtthVYQA%40mail.gmail.com.

Reply via email to