This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: coff section flags: STYP_COPY, in particular, for TI COFF files


Ian Lance Taylor wrote at 19:55 -0700 on Apr  6:
 > Well, given their definition of ``loaded,'' it sounds to me like an
 > STYP_COPY section is one which has contents, but the contents are not
 > copied into memory at execution time.  This is true, for example, of a
 > section which holds debugging information.  In BFD terms, I think such
 > a section would be SEC_HAS_CONTENTS, but no other flags (except maybe
 > SEC_RELOC).

Right, that's what I was trying to do with the original patch to
coffcode.h (where I tried to handle the previously unhandled STYP_COPY
in a way consistent with the comments in internal.h).  Unfortunately,
the general COFF code may not be the place if TI's COFF treatment is
sufficiently abnormal.

But I did try to match the comments in internal.h - if those are
wrong, I suppose they should be fixed - or words added to indicate
that different COFF implementation may differ with their intended use
of STYP_* flags.

Instead of modifying the general COFF handling in binutils, I may
rather want to override that behavior for TI COFF.


 > The only way to know whether this makes any sense is to examine the
 > actual behaviour of the TI tools when given a STYP_COPY section.  For
 > example: how is an STYP_COPY section created in the first place?  What
 > happens to an STYP_COPY section at link time?  At run time?

I have asked TI support for a more detailed explanation regarding how
their tools behave for various section types.  We'll see what they
have to say.


 > One of the reasons why people should avoid COFF is that it was never
 > properly documented.  The AT&T docs said nothing useful.  There was an
 > O'Reilly book a while back, now out of print, which is more or less
 > ``everything you wanted to know about COFF except what you really need
 > to know.''

So, I'm finding out.


 > I checked the O'Reilly book, and it does not mention STYP_COPY.  My
 > SVR3 docs are sufficiently buried that I don't really feel like
 > searching for them.  I would be surprised if they mention STYP_COPY.

Someone else here had the O'Reilly COFF book, too (1988).  As you say,
it wasn't much help.

Does anyone know who was the original porter(s) of C54x to binutils?
Maybe they can point to something that clears it up.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]