Monday, September 2, 2024 Andrew Pinski <pins...@gmail.com> wrote: > Could you expand on this and why you think disabling is correct? > It is so you could do: > adrp x0, .LANCHOR0 > add x2, x0, :lo12:.LANCHOR0 > ldr w1, [x0, #:lo12:.LANCHOR0] > ldr w0, [x2, 4] > > Rather than: > adrp x1, t > adrp x0, t1 > ldr w1, [x1, #:lo12:t] > ldr w0, [x0, #:lo12:t1] > add w0, w1, w0 > > Notice how there is only one adrp in the anchor case. > Could you expand on why the section anchors don't work for pe-coff?
The same explanation applies to addr/ldr when an anchor is used with an offset. https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662213.html Regards, Evgeny