This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Compiler uses a lot of memory for large initialized arrays
>> Or can't we seek in the asm output and overwrite previously written values?
>> Might be slow, though.
>
>Even if that were sensible, where will we remember the file offsets
>of each and every element :)
I was going to suggest using .org to go back and overwrite the
previous value in the assembler code(since you can compute the offset
quite easily, at least for arrays), but I see the GAS .org info page
has the following:
`.org' may only increase the location counter, or leave it
unchanged; you cannot use `.org' to move the location counter
backwards.
Because `as' tries to assemble programs in one pass, NEW-LC may not
be undefined. If you really detest this restriction we eagerly await
a chance to share your improved assembler.
So I have to ask how many GCC targets *don't* use GAS? If that is
very few(to none), then perhaps the best solution is to look into
modifying GAS to allow backward setting of .org, or is that an even
bigger problem?
--
Peter Barada
peter@the-baradas.com