aarch64-pe can't fill 16 bytes in section .text
Jan Beulich
jbeulich@suse.com
Fri Nov 18 09:08:34 GMT 2022
On 18.11.2022 09:52, Zac Walker via Binutils wrote:
> Patch merged just now. (Was a holiday here yesterday)
>
> I am still investigating another alignment problem so might be another follow up patch. This code from OpenBLAS:
>
> data_ar:
> .word 0x3e44fae6
> data_ai:
> .word 0x3d320fa2
> start:
> ldr s20, data_ar
> ldr s21, data_ai
>
> Produces:
>
> zscal-min.s:2: Warning: value 0x3e44fae6 truncated to 0xfae6
> zscal-min.s:4: Warning: value 0x3d320fa2 truncated to 0xfa2
> zscal-min.s:7: Error: pc-relative load offset not word aligned
>
> Works ok with clang. I am not sure if .word data should be aligned by default in gas or this is just a difference in behaviour.
.word is overridden by tc-aarch64.c only for ELF. So in your COFF (aiui)
case .word emits just two bytes instead of the expected four. Hence also
the warnings, not just the error.
Jan
More information about the Binutils
mailing list