[cfe-dev] ld linker freezes my computer

Eli Friedman eli.friedman at gmail.com
Mon Oct 15 13:43:37 PDT 2012


On Mon, Oct 15, 2012 at 1:08 PM, Andrew Pennebaker
<andrew.pennebaker at gmail.com> wrote:
> Summary:
>
> Attempting to link a clang i386 object file into a Mac executable results in
> my computer becoming nonresponsive.
>
> I inquired about assembling code with the GNU assembler (Gas AKA as). As
> Xcode contains an old linker, as 1.38, Apple advised using clang instead,
> per ticket 12408921
> (https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/3/wo/UMrtsuR9aIxsbFCn1P0R4w/5.83.28.0.9).
>
> Steps to Reproduce:
>
> 1. Download the Hello World Gas code
> (https://github.com/mcandre/mcandre/tree/master/gas/hello/freebsd).
> 2. Run "make".
>
> Expected Results:
>
> 3. The object code is linked into an executable, and then the executable is
> run.
>
> $ make
> clang -c -o hello.o -arch i386 hello.s
> ld -o hello -macosx_version_min 10.6 hello.o
> ./hello
> Hello World!
>
> Actual Results:
>
> 3. The computer freezes up.
>
> $ make
> clang -c -o hello.o -arch i386 hello.s
> ld -o hello -macosx_version_min 10.6 hello.o
> (frozen)
>
> Attempts to stop the linker with Control+C, quitting Terminal.app, Force
> Quit Applications, and Activity Monitor fail, as the system becomes too slow
> to process user input.

Please don't post questions about tools distributed by Apple to
cfe-dev; this list is for development of clang and users of the clang
as distributed by llvm.org .  devforums.apple.com is one appropriate
place to discuss Xcode and the associated tools.

-Eli



More information about the cfe-dev mailing list