https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123791

--- Comment #2 from Wilco <wilco at gcc dot gnu.org> ---
Yes that looks wrong. For any data addressing we always emit ADRP/ADD for the
address and then add the offset. For code addresses we should do the same.

With -mcmodel=large or -mpc-relative-literal-loads these literals end up  in
the .text section - hopefully the linker complains...

Unfortunately use_blocks_for_constant_p has no effect on anchor usage. Hence I
needed to force select_rtx_section to return .rodata. I can add more code to
check the rtx has no relocations, but ideally use_blocks_for_constant_p should
take precedence in varasm.

Reply via email to