linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konstantin Boldyshev <konst@linuxassembly.org>
To: "linux-assembly@vger.kernel.org" <linux-assembly@vger.kernel.org>
Subject: Re: new asmutils are on the way
Date: Mon, 13 Feb 2006 19:40:36 +0300	[thread overview]
Message-ID: <43F0B684.9030705@linuxassembly.org> (raw)
In-Reply-To: <43ED3518.6070206@comcast.net>

Frank Kotler ?????:

>> Actually this started with 2.6.11 kernel. This is a bug, somone just 
>> needs to make patch and send it to Linus.
>
> I haven't got his address - you send it to him! :) Seriously, there 
> are "channels" for bug reports... First off, what's the desired 
> behavior here? Older kernels sent the last section off to be 
> zero-filled, and the return from this operation was completely 
> ignored. That isn't very sound, and I wouldn't want to argue for a 
> return to it. Perhaps we check the flags for the last section, and 
> send it off to be zero-filled only if it's intended to be writeable?

Yes, I think this would be the best solution. AFAIK ELF standard doesn't
force *any* section to be present, and does not force any section order.

But I discovered that ld starting from some version adds empty .bss section
even if was not present in the object file. So, it's also kind of a "fix" :)

> Higher numbers enable that number of "optimization" passes. The 
> original code had "-O2" and "-O3" special-cased to 10 and 15 passes 
> (so "-O4" was actually less). Somewhere along the line, it was decided 
> that special-casing these options was "bad practice" and it was 
> removed. So now, you get the number of passes you specify. "-O2" and 
> "-O3" are not *nearly* enough. "-O2" (at least) will silently produce 
> bad code!!! The workaround to this bug is simply to use a good big 
> number - I use "-O999" (when I use "-O" at all) - even bigger wouldn't 
> hurt - it's a *maximum* number of extra passes - Nasm stops when it's 
> done. If Nasm *can't* resolve all the jump displacements within the 
> number of passes you specify, it burps up the "phase error" message. 
> The appearance of this message when *any* symbol error occurs is a 
> "bonus"... okay, that's a bug, too...
>
> Adding "v" to the parameter - "-O999v" - causes Nasm to report how 
> many passes it actually took (not that useful...).

Thanks, this clarifies a lot of things.
During tests, all asmutils code was assembled in 4-5 passes :-)

>
> Where asmutils is "hand optimized", it probably isn't much use - 
> although you might use it as a "test" to see if Nasm can find anything 
> you missed... sometimes finds things *I* miss... 

Well, of course I would like to get rid of that "optimization macros",
since a macro can just can't handle all cases correctly.

As for jump displacements, I think it's a good idea to turn them on and 
off separately,
for instance add another switch for them with number of passes (-Jn ?). 
Just an idea.

--
Regards,
Konstantin.



  reply	other threads:[~2006-02-13 16:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200506292204.j5TM4mLj024638@zeus2.kernel.org>
2005-06-29 23:37 ` TT6: High-quality custom logos and business identities Richard Cooper
2005-06-30  1:13   ` James Colannino
2005-07-01 22:31     ` Steffen Solyga
2005-07-01 22:33       ` Hendrik Visage
2005-07-02  5:28       ` Frank Kotler
2005-07-03  6:15         ` Daniel Bonekeeper
2005-07-08  5:28           ` Richard Cooper
2005-07-04 16:30         ` Does anyone still read this list? Agner Fog
2005-07-03 17:17       ` TT6: High-quality custom logos and business identities jko
2005-06-30  3:09   ` Herbert Poetzl
2005-07-06 11:57   ` Konstantin Boldyshev
2005-07-06 20:03     ` linuxassembly.org - asmutils Frank Kotler
2005-07-07 19:20       ` Konstantin Boldyshev
2006-02-08  6:26         ` new asmutils are on the way Konstantin Boldyshev
2006-02-08 12:57           ` Frank Kotler
2006-02-08 22:22             ` Konstantin Boldyshev
2006-02-11  0:51               ` Frank Kotler
2006-02-13 16:40                 ` Konstantin Boldyshev [this message]
2006-02-21 15:41                   ` asmutils 0.18 released Konstantin Boldyshev
2006-02-21 16:00                     ` Jan Wagemakers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43F0B684.9030705@linuxassembly.org \
    --to=konst@linuxassembly.org \
    --cc=linux-assembly@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).