avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] [RFC] Unified ELF file


From: Colin O'Flynn
Subject: Re: [avr-libc-dev] [RFC] Unified ELF file
Date: Tue, 02 Oct 2007 23:40:57 -0300
User-agent: KMail/1.8.2

Hi again,

>From avrdude's perspective:

The layout of the ELF file should work. The code in avrdude can just catch the 
call to write LFUSE/EFUSE/HFUSE and point it towards the proper spot fairly 
easily.

But the patches did work for me OK, example built. I'm not really sure of 
this: but should there be more flags for the .fuse section?

Right now I see this from "avr-objdump -x test.elf"

  0 .text         00000a3e  00000000  00000000  00000094  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .eeprom       00000028  00810000  00810000  00000ad2  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  2 .fuse         00000003  00820000  00820000  00000afa  2**0
                  ALLOC
  3 .stab         00000a5c  00000000  00000000  00000afc  2**2
                  CONTENTS, READONLY, DEBUGGING
  ....more stuff i don't care about, and note I added EEPROM to see what that 
section has set....

Shouldn't we have the CONTENTS and READONLY flag as well? I don't know why the 
READONLY flag should be set, just that it is set in everything else ;-) But 
for the libbfd to read the ELF file, I'm pretty sure the CONTENTS flag has to 
be set. Possible the LOAD flag as well...

I'm going by the libbfd user manual 
(http://www.gnu.org/software/binutils/manual/bfd-2.9.1/html_mono/bfd.html#SEC51)
 
which says about the API that reads from the file:

"If the section does not have the SEC_HAS_CONTENTS flag set, then the location 
is filled with zeroes.". 

Regards,

 -Colin




reply via email to

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