Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 28 Apr 2015 14:58:52 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] force LTO to be disabled when compiling dlstart.lo

On Tue, Apr 28, 2015 at 09:50:59PM +0300, Alexander Monakov wrote:
> > If the person on #gcc with ld -r was using gcc asm statements as well, that
> > would explain their problem too.
> 
> Let me add that there's another class of problems with toplevel asms and LTO:
> as a result of LTO partitioning, toplevel asm may be moved into a different
> partition from the symbol it's referencing, breaking the build (when toplevel
> asm is referencing a static function).  GCC bug report for that issue is here:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57703

I have an interesting solution to this problem: get rid of the
top-level asm and instead put it inside the function with 2 additional
lines:

- At the top, "jmp 9f" or equivalent.
- At the bottom, "9:".

Now the asm can't be separated from the function because it's part of
it. Would that work?

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.