[all-commits] [llvm/llvm-project] 1b704e: [MC, llvm-readobj, yaml2obj] Support CREL relocation...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Jul 1 10:32:23 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1b704e889f09b5dfc0549786542bc6d2cd54e85b
https://github.com/llvm/llvm-project/commit/1b704e889f09b5dfc0549786542bc6d2cd54e85b
Author: Fangrui Song <i at maskray.me>
Date: 2024-07-01 (Mon, 01 Jul 2024)
Changed paths:
M llvm/include/llvm/BinaryFormat/DynamicTags.def
M llvm/include/llvm/BinaryFormat/ELF.h
M llvm/include/llvm/MC/MCTargetOptions.h
M llvm/include/llvm/MC/MCTargetOptionsCommandFlags.h
M llvm/include/llvm/Object/ELF.h
M llvm/include/llvm/Object/ELFTypes.h
M llvm/lib/MC/ELFObjectWriter.cpp
M llvm/lib/MC/MCTargetOptionsCommandFlags.cpp
M llvm/lib/Object/ELF.cpp
M llvm/lib/ObjectYAML/ELFEmitter.cpp
M llvm/lib/ObjectYAML/ELFYAML.cpp
A llvm/test/MC/ELF/crel-32.s
A llvm/test/MC/ELF/crel.s
A llvm/test/tools/llvm-readobj/ELF/crel.test
M llvm/test/tools/llvm-readobj/ELF/dynamic-reloc.test
M llvm/test/tools/llvm-readobj/ELF/dynamic-tags.test
M llvm/test/tools/llvm-readobj/ELF/relocation-errors.test
M llvm/test/tools/llvm-readobj/ELF/section-types.test
M llvm/test/tools/yaml2obj/ELF/dynamic-relocations.yaml
M llvm/test/tools/yaml2obj/ELF/reloc-sec-entry-size.yaml
A llvm/test/tools/yaml2obj/ELF/relocation-crel.yaml
M llvm/test/tools/yaml2obj/ELF/relocation-missing-symbol.yaml
M llvm/test/tools/yaml2obj/ELF/relocation-type.yaml
M llvm/tools/llvm-readobj/ELFDumper.cpp
Log Message:
-----------
[MC,llvm-readobj,yaml2obj] Support CREL relocation format
CREL is a compact relocation format for the ELF object file format.
This patch adds integrated assembler support (using the RELA form)
available with `llvm-mc -filetype=obj -crel a.s -o a.o`.
A dependent patch will add `clang -c -Wa,--crel,--allow-experimental-crel`.
Also add llvm-readobj support (for both REL and RELA forms) to
facilitate testing the assembler. Additionally, yaml2obj gains support
for the RELA form to aid testing with llvm-readobj.
We temporarily assign the section type code 0x40000020 from the generic
range to `SHT_CREL`. We avoided using `SHT_LLVM_` or `SHT_GNU_` to
avoid code churn and maintain broader applicability for interested psABIs.
Similarly, `DT_CREL` is temporarily 0x40000026.
LLVM will change the code and break compatibility. This is not an issue
if all relocatable files using CREL are regenerated (aka no prebuilt
relocatable files).
Link: https://discourse.llvm.org/t/rfc-crel-a-compact-relocation-format-for-elf/77600
Pull Request: https://github.com/llvm/llvm-project/pull/91280
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list