[llvm-commits] [PATCH] Work around an Apple linker bug

Eli Friedman eli.friedman at gmail.com
Tue Feb 23 09:51:16 PST 2010


On Tue, Feb 23, 2010 at 9:00 AM, Charles Davis <cdavis at mymail.mines.edu> wrote:
> While compiling Wine with clang, I discovered a bug in the Apple linker.
>
> When LLVM encounters what it believes to be a UTF-16 string, it places
> it in the (__TEXT, __ustring) section. Unfortunately, if a global symbol
> is placed there, the linker does not see it and loses the symbol. I have
> filed <rdar://problem/7672401> to keep track of this.
>
> This patch disables generation of the (__TEXT, __ustring) section.
> UTF-16 string constants will be placed in the (__TEXT, __const) section
> instead (as GCC does). This is a temporary workaround until Apple fixes
> the linker bug.

How about just never putting symbols with external linkage into a
string section?

-Eli



More information about the llvm-commits mailing list