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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Wilco from comment #2)
> 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...

Yeah, I've wondered about that too.
Again, rather than duplicating what default_elf_select_rtx_section does, wonder
if for
aarch64_can_use_per_function_literal_pools_p it shouldn't do the same and just
return
function_section (current_function_decl) only if it returned
readonly_data_section (again, with -fmerge-constants temporarily disabled).

Reply via email to