Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug/elf: add missing PPC64 ELFv2 1.5 relocation constants #54345

Closed
pmur opened this issue Aug 8, 2022 · 3 comments
Closed

debug/elf: add missing PPC64 ELFv2 1.5 relocation constants #54345

pmur opened this issue Aug 8, 2022 · 3 comments

Comments

@pmur
Copy link
Contributor

pmur commented Aug 8, 2022

I propose defining constants for all relocation values specified by the PPC64 ELFv2 1.5 ABI supplement.

This defines many new relocation types which will be needed to support the new PC-relative addressing mode created in ISA 3.1, and implemented in Power10.

Similarly, some constants are necessary to support internal linking of C object files build with gcc's -fno-plt feature (#53345).

The following constants would be added and defined according to the ABI:

R_PPC64_COPY
R_PPC64_GLOB_DAT
R_PPC64_UADDR32
R_PPC64_UADDR16
R_PPC64_PLT32
R_PPC64_PLTREL32
R_PPC64_PLT16_LO
R_PPC64_PLT16_HI
R_PPC64_PLT16_HA
R_PPC64_SECTOFF
R_PPC64_SECTOFF_LO
R_PPC64_SECTOFF_HI
R_PPC64_SECTOFF_HA
R_PPC64_REL30
R_PPC64_UADDR64
R_PPC64_PLT64
R_PPC64_PLTREL64
R_PPC64_PLTSEQ
R_PPC64_PLTCALL
R_PPC64_PLTSEQ_NOTOC
R_PPC64_PLTCALL_NOTOC
R_PPC64_PCREL_OPT
R_PPC64_D34
R_PPC64_D34_LO
R_PPC64_D34_HI30
R_PPC64_D34_HA30
R_PPC64_PCREL34
R_PPC64_GOT_PCREL34
R_PPC64_PLT_PCREL34
R_PPC64_PLT_PCREL34_NOTOC
R_PPC64_ADDR16_HIGHER34
R_PPC64_ADDR16_HIGHERA34
R_PPC64_ADDR16_HIGHEST34
R_PPC64_ADDR16_HIGHESTA34
R_PPC64_REL16_HIGHER34
R_PPC64_REL16_HIGHERA34
R_PPC64_REL16_HIGHEST34
R_PPC64_REL16_HIGHESTA34
R_PPC64_D28
R_PPC64_PCREL28
R_PPC64_TPREL28
R_PPC64_DTPREL28
R_PPC64_GOT_TLSGD_PCREL34
R_PPC64_GOT_TLSLD_PCREL34
R_PPC64_GOT_TPREL_PCREL34
R_PPC64_GOT_DTPREL_PCREL34
R_PPC64_REL16_HIGH
R_PPC64_REL16_HIGHA
R_PPC64_REL16_HIGHER
R_PPC64_REL16_HIGHERA
R_PPC64_REL16_HIGHEST
R_PPC64_REL16_HIGHESTA
R_PPC64_GNU_VTINHERIT
R_PPC64_GNU_VTENTRY
@pmur pmur added the Proposal label Aug 8, 2022
@gopherbot gopherbot added this to the Proposal milestone Aug 8, 2022
@ianlancetaylor ianlancetaylor added this to Incoming in Proposals (old) Aug 8, 2022
@gopherbot
Copy link

Change https://go.dev/cl/425555 mentions this issue: debug/elf: define additional PPC64 ELFv2 relocations

@gopherbot
Copy link

Change https://go.dev/cl/435415 mentions this issue: debug/elf: fix typo in R_PPC64_TPREL34 and R_PPC64_DTPREL34

@dmitshur dmitshur modified the milestones: Proposal, Go1.20 Sep 29, 2022
gopherbot pushed a commit that referenced this issue Sep 29, 2022
The suffix should be 34 not 28. I misread the name because the
reloc listed before these two in the ABI is named "R_PC64_PCREL28".

Updates #54345

Change-Id: Ie8238f55e441c787d70ead58e0a177c650f8b89e
Reviewed-on: https://go-review.googlesource.com/c/go/+/435415
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
@rsc
Copy link
Contributor

rsc commented Feb 1, 2023

Retroactively accepting. Next time we should wait for the proposal to be accepted.

@rsc rsc changed the title proposal: debug/elf: add missing PPC64 ELFv2 1.5 relocation constants debug/elf: add missing PPC64 ELFv2 1.5 relocation constants Feb 1, 2023
@golang golang locked and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Development

No branches or pull requests

4 participants