[llvm] [llvm][MC][ARM][Assembly] Emit relocations for ADRs and big-endian targets (PR #73834)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 05:06:31 PST 2024


bd1976bris wrote:

@eleanor-arm, @smithp35 thanks for the fix :)

Unfortunately, our CI shows failures with other relocation types. I'm sorry for not reporting this previously. For example, in [locore-v6.S](https://svnweb.freebsd.org/base/stable/12/sys/arm/arm/locore-v6.S?view=markup) `cpu_halt` references `cpu_reset_address` defined in [machdep.c](https://svnweb.freebsd.org/base/stable/12/sys/arm/arm/machdep.c?view=markup). I am seeing a `recompile with -fPIC` error for an `R_ARM_ABS32` for that reference with your change. I think that this is a reproducer: 

```
        .text
        .arm
_start: .word dest
        .section .text.1, "ax", %progbits
.globl dest
dest: .word 10
```

see: https://godbolt.org/z/1reqb1xE6

I am also seeing similar errors for R_ARM_THM_MOVW_ABS_NC and R_ARM_THM_MOVT_ABS relocations. I'll work on getting a full set of errors out of our CI and reported to you. Although, it might be better if we could somehow identify the possible set of affected relocation types without experimentation?

https://github.com/llvm/llvm-project/pull/73834


More information about the llvm-commits mailing list