[Top][All Lists]

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

Re: [avr-gcc-list] avr-objcopy not copying custom section...

From: Erik Christiansen
Subject: Re: [avr-gcc-list] avr-objcopy not copying custom section...
Date: Thu, 26 May 2011 15:26:53 +1000
User-agent: Mutt/1.5.20 (2009-06-14)

On 26.05.11 01:09, Boyapati, Anitha wrote:
> >
> >What made me mention the BFD flags is w.r.t 'CONTENTS' and 'LOAD'. These do
> >not appear in ELF spec as section attributes. So I think objdump is just
> >dumping ELF+ extra BFD attributes.
> >
> Oops, typo. Please read attributes as flags.

Anitha, please have a look at "man elf". I don't know what's in "the age
old System V ABI spec", but "man 5 elf" is from 2007, and describes
Elf(64|32)_Shdr structures, containing an sh_flags member, including
these bits:

SHF_WRITE      This section contains data that should be writable during process

SHF_ALLOC      This section occupies memory during process execution.  Some con‐
               trol  sections  do  not  reside  in the memory image of an object
               file.  This attribute is off for those sections.

SHF_EXECINSTR  This section contains executable machine instructions.

SHF_MASKPROC   All bits included in this mask are  reserved  for  processor-spe‐
               cific semantics.

So we can see that the ELF format does provide explicit flags for X and A.
Admittedly, three sets of flags, distributed over three different
structure types, with one set of flags documented as having no function,
doesn't make things quite as transparent as they could be. (And being a
little bit civilised, in company at least, I'll say _nothing_ about old
doco. ;-)


P.S. If you're exiled on an M$ box, then the same guff is here:


(Now I'd better start that 3 hr drive.)

A wife asks her husband, a software engineer: "Could you please go shopping
for me and buy one carton of milk, and if they have eggs, get six." A short
time later the husband comes back with six cartons of milk. The wife asks
him, "Why did you buy six cartons of milk?" He replied, "They had eggs."

reply via email to

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