avr-gcc-list
[Top][All Lists]
Advanced

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

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


From: Björn Haase
Subject: [avr-gcc-list] Re: Avoiding copy_data in config/avr/avr.c
Date: Thu, 28 Jul 2005 22:43:45 +0200
User-agent: KMail/1.7.1

IIUC, there should be an easy workaround that, however, could result in 
slightly bloated assembler source files. In case that the compiler generates 
the 

\t.global __do_copy_data\n

sequences each time, it emits a \t.data , it would no longer be necessary to 
communicate at the beginning of every file that these symbols are used. In 
order to do this, one would probably have to add the two following target 
hook definitions

#undef DATA_SECTION_ASM_OP
#define DATA_SECTION_ASM_OP "\t.global __do_copy_data\n\t.data"
#undef BSS_SECTION_ASM_OP
#define BSS_SECTION_ASM_OP "\t.global __do_clear_bss\n\t.bss"

at the beginning of avr.c (best in the block around line 222). Then, I think, 
it should be possible to remove the two lines

  fputs ("\t.global __do_copy_data\n", asm_out_file);
  fputs ("\t.global __do_clear_bss\n", asm_out_file);

completely. I did not try it so far, but I am confident that with the change I 
have sketched above the issue should be resolved.

Yours,

Bjoern




reply via email to

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