Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 22 Jun 2016 23:04:18 -0700
Cc: Rich Felker <>, Rich Felker <>
Subject: Re: build musl for armv7m

If it is not a weak symbol, you may get "multi-def" error. It depends on 
the obj/lib order on command line.
If it is a weak symbol, then a non-weak symbol can override it.

Anyway, your comment reminds me that we can use -wrap=exit to override 
it. So no change is needed.

btw, will you commit the change of those .s files for armv7m ?


On 2016-06-22 21:22, Rich Felker wrote:
> On Wed, Jun 22, 2016 at 05:21:54PM -0700, Zhao, Weiming wrote:
>> Fixed.
>> Btw, can we make exit() weak function? (patch attached)
>> This allows user code to redefine it because in baremetal
>> environment, sometime we want to customize it. For example, some
>> code never exits, so we can define a dummy exit() and thus save code
>> size.
> No, this is a hack and is not even needed to do what you're asking
> for. The way linking an archive works, an object in the archive is
> only pulled in to the link process when it satisfies an undefined
> symbol reference, and if you defined your own exit, then exit.o would
> never have reason to get linked.
> But there are all sorts of things that can break unexpectedly from
> redefining standard functions, which is why it's UB and this is not
> supported usage.
> Rich

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.