This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Getting asm macros expanded
On Thursday 19 March 2009 Nick Clifton wrote:
> > Some background information is available at
> > http://gcc.gnu.org/ml/gcc/2009-02/msg00497.html
>
> Interesting. You know you could probably achieve the same effect in the
> linker...
But the linker sees no assembler statements - it would have to deassemble the
code, right?
> It already has mechanisms in place for changing the code
> (search for "relax")
Yes, thank you.
> and if you made the transformation in the linker
> you would not have to worry about assembler macros.
That's true.
But for me as an outsider it's much easier to provide some scripts working via
STDIN/STDOUT than looking in the C sources of some big project.
Of course, if that's seen as valuable it might be re-implemented in the linker
or assembler - which would provide great speed benefits, too.
> Plus you would be
> able to transform code in libraries as well...
Libraries can be done - they just have to be re-compiled, like normal
binaries. Or do I misunderstand you here?
I even thought about exporting such often-used sequences via glibc or
whatever, so that programs can use these directly - but I think that the jump
into another object wouldn't provide so much benefit (space of
exports/imports, speed of double jump, dependency on exact identical code
sequences, etc.)
I nearly got a kernel to compile (only some symbols couldn't be resolved
in .tmp_vmlinux1), and got 30500 bytes off the binary - that's 0.73%.
Other things like libgcj.so.90 could get 1.5% (rouch estimate, didn't try to
compile), because this one is nearly *only* functions with common endings.
Regards,
Phil
--
Versioning your /etc, /home or even your whole installation?
Try fsvs (fsvs.tigris.org)!