[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-libc-dev] [RFC] Unified ELF file
From: |
Eric Weddington |
Subject: |
RE: [avr-libc-dev] [RFC] Unified ELF file |
Date: |
Wed, 03 Oct 2007 13:50:53 -0600 |
> -----Original Message-----
> From: Colin O'Flynn [mailto:address@hidden
> Sent: Tuesday, October 02, 2007 8:41 PM
> To: address@hidden
> Cc: Eric Weddington
> Subject: Re: [avr-libc-dev] [RFC] Unified ELF file
>
> 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 ;-)
In practice, I don't think it really much matters, as it will external tools
that will handle that section anyway, and those tools don't really care what
the flags are set to; only that the data is correct.
But, in theory, I think that .fuse should not have ALLOC (does the OS need
to allocate memory when loading the file?). I think that .fuse should not
have READONLY (can't we read the fuses from the device and write to an ELF
file? Should it even have LOAD (the fuse data is not technically a part of
the application)? I don't think that DATA qualifies either, as this is not
data that the application uses directly.
When a __fusemem__ attribute gets added to GCC, then (I think) we should be
able to set the flags as needed. From looking at the ld manual, I don't see
how to do it with just linker script machinery.
Eric