[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

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED

--- Comment #7 from Iain Sandoe <iains at gcc dot gnu.org> ---
hmm .. so it's not consistent .. 

clang : x86_64 :
        .section        __TEXT,__literal16,16byte_literals
        .p2align        4, 0x0                          ## @__const._Z3tu1l.t
L___const._Z3tu1l.t:
        .ascii  "0123456789abcdef"


clang : arm64 :
        .section        __TEXT,__literal16,16byte_literals
l___const._Z3tu1l.t:                    ; @__const._Z3tu1l.t
        .ascii  "0123456789abcdef"

Which is really odd, ld knows how to split up 16byte_literals sections .. they
are, by definition, in 16bye chunks.

If we hack the code to make the strings not exactly 16bytes - clang places in
.const and makes the label 'l' as expected.

---

we are, placing them in .const, so that's correct ABI-wise 
OK .. so the thing is not to make every .cstring entry 'l' which will gain a
relocation .. but only force it on the .const ones ... so not a blanket "all
strings".
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.