[Bug target/126723] aarch64-darwin: temporary L.str labels miscompile literals after a weak_definition

"iains at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126723

--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
As background, the reason that I made the non-ASAN symbols L is that clang does
not always make string labels 'l' (see below) - in general, it is inefficient
to make more symbols than necessary linker-visible (more relocations, bigger .o
files and more linker load) .. however, the current TARGET_MACRO scheme does
not make it feasible to have a complex algorithm - I have a WIP branch to try
and improve this - but probably a short-term fix is to fall back to all strings
being linker-vis (definitely for the upcoming 16.2 release)

=== clang 17:


e.g:

        .section        __TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
        .asciz  "try...."

L_.str.1:                               ## @.str.1
        .asciz  "Hello, C++ world. from "

L_.str.2:                               ## @.str.2
        .asciz  "Apple LLVM 17.0.0 (clang-1700.6.3.2)"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.