bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re[2]: Bug in gas, with expressions in macros


From: Nick Clifton
Subject: Re: Re[2]: Bug in gas, with expressions in macros
Date: 28 May 2002 11:21:20 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1

Hi Brian,

>   Just out of curiosity, why does GAS use fragments?

Well it is an old hack, and it has been giveing us problems ever since
it went in, but the principle is that it allows the assembler to be a
single pass program instead of having to make two passes over the
source.

> Why not just check to see if a non-constant variable is in the same
> section as the one from which it's being subtracted and then call it
> good? Would this work?

Because of relaxing.  The assembler (for some targets) is able to
relax the code, shrinking (and growing) the contents of a single
section.  Also resolving relocations can change the size of code, as
can satisfying alignment requirements.

Of course if you feel like rewriting the code from scratch feel free
to have a go :-)

Cheers
        Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]