commit | c3ff3b2ba36aa638ab6101096799d3960bbd6f17 | [log] [tgz] |
---|---|---|
author | Alex Rønne Petersen <alex@alexrp.com> | Sun May 04 21:32:17 2025 +0200 |
committer | GitHub <noreply@github.com> | Sun May 04 12:32:17 2025 -0700 |
tree | c8073713a1ac37a99c7a5d940892af145c4f8a42 | |
parent | 4c587f549cbbea0ac1db2b983b8c5fb4fff82d72 [diff] |
[SPARC][MC] Fix `%gdop_hix22()` and `%gdop_lox10()` to use correct relocations (#137915) 1bfc5e7 introduced support for `%gdop_hix22()` and `%gdop_lox10()`. However, it incorrectly mapped them to `R_SPARC_GOTDATA_HIX22` and `R_SPARC_GOTDATA_LOX10`. They should in fact emit `R_SPARC_GOTDATA_OP_HIX22` and `R_SPARC_GOTDATA_OP_LOX10`. This became a problem when assembling glibc's PIC startup code: ```asm sethi %gdop_hix22(main), %o0 xor %o0, %gdop_lox10(main), %o0 ldx [%l7 + %o0], %o0, %gdop(main) ``` After the `xor`, `%o0` should contain the GOT offset for `main`, but because of the incorrect relocations, it actually ends up containing the address of `main`, which of course makes the following `ldx` fail.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.