Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Tue, 1 Dec 2015 19:37:27 -0500
From: Rich Felker <>
To: N Jain <>
Subject: Re: MUSL 5.2.0 Static linking issue

I've CC'd the musl list which I think you intended to do; your
original cc was to musl-admin rather than musl so it didn't make it to
the list.

On Tue, Dec 01, 2015 at 12:37:28PM -0500, N Jain wrote:
> Hi,
> I am using MUSL 5.2.0 latest compiler for compiling my ARM application but

I assume you mean gcc 5.2.0 targeting musl?

> when I try to run the application I am getting issue at __set_thread_area
> API.

Can you show the actual error you're getting?

> I am not sure if the static linking is broken for MUSL 5.2.0 ? I am using
> following command to compile the application and using "-static" option
> while linking to ignore dynamic linking.
> Please let me know how to avoid dynamic linking and how to resolve this ? I
> do want dynamic as well static linking capabilities so I am generating
> compile with default configuration.
> arm-linux-musleabi-gcc -static-libgcc -static-libstdc++ -I. -MD -MP
> -mcpu=cortex-a15  -O2 -g  -Wall -Werror  -std=gnu11  -D_POSIX_SOURCE -c
> hello.c -o hello.o
> arm-linux-musleabi-ld -static -nostartfiles $(OBJS) libs.a -Tlink.ld -o
> app.elf

Using ld directly is not expected to work unless you reproduce all the
options the compiler driver (gcc) would pass to it; the main place you
_might_ want to invoke ld directly is when doing
freestanding/bare-metal development, but musl is not going to be
useful for this out of the box; you'd need to customize it to your
environment. I can't tell from your email exactly what you're trying
to do, though.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.