[Top][All Lists]

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

Re: [avr-gcc-list] Avoiding copy_data in config/avr/avr.c avr_file_start

From: Erik Christiansen
Subject: Re: [avr-gcc-list] Avoiding copy_data in config/avr/avr.c avr_file_start()?
Date: Thu, 28 Jul 2005 20:08:49 +1000
User-agent: Mutt/1.5.6+20040722i

On Wed, Jul 27, 2005 at 09:11:06PM -0700, Ben Jackson wrote:
> Right.  However, I think it's doomed.  I'm getting into this case:
>           else if (allocation_done == lang_final_phase_enum
>                    || assigning_to_dot)
>             einfo (_("%F%S: undefined symbol `%s' referenced in 
> expression\n"),
> so in fact my phase guess was not far off.  By the time SIZEOF(.data)
> can be resolved, it's too late to add more stuff.  Makes sense in a way--
> what if the 'more stuff' dragged in more .data?

OK, if we're doomed, then we have to solve it differently. :-)

If we're the rodent that really wants the cheese, would we go as far as
peeking at size of .bss & .data from objdump -h, then conditionally
performing a complete new link, with do_copy_xx.o, in the makefile? 

As a refinement, incremental linking (first without either do_copy)
provides the minimal application code. A subsequent, conditionally
executed, incremental link then adds do_copy_bss, and a final
non-incremental link adds do_copy_data, or no files. The alternative
finish is needed only because an incremental link will not show up any
address range errors.

It's less than beautiful, but it should deliver the desired automation.
(Unless I've forgotten something.)


reply via email to

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