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

Re: RFC: Program Properties



On 21-Oct-2016 11:16 PM, H.J. Lu wrote:

On Tue, Oct 18, 2016 at 8:16 AM, Nick Clifton <nickc@redhat.com> wrote:


* The information is stored in a new section in the file using the ELF
  NOTE format.  Creator tools (compilers, assemblers etc) place the notes
  into the binary files.  Consumer tools (none written yet, but readelf
  and/or objdump could be enhanced for this purpose) read the notes and
  answer questions about the binaries concerned.  Static linkers need
  special care to handle merging of the notes.

* The information is stored in a section called .gnu.build.attributes.
  (The name can be changed - it is basically irrelevant anyway, it is
  the new section flag (defined below) that matters).   The section has
  the SHT_NOTE type and a new section flag set: SHF_GNU_BUILD_ATTRIBUTES.
  (Suggested value: 0x00100000).  This ndicates the special needs when
  merging notes (see below).

  The sh_link field should be set to contain the index of symbol table
  section.  If this field is 0 then the consumer should assume that
  the first section of type SHT_SYMTAB in the section headers is
  symbol table being used.

It doesn't sound like a note section, whose content should be
described by the note type.  Will a new section type work
better?

On HP-UX, we have similar stuff (build attributes) that records information about build tools, time stamps, entire command line options, and many more.

However, we do store this as a note type, but make it HP-UX specific (.note.hp-ux...). We also have a tool called "footrprints" which parses this note and prints the info in a very user friendly way. However, in certain cases, the granularity of the information may not be upto symbol level; it is only upto individual relocatable object file level.

Any reason why you think it does not sound like a note type?

BTW, I am happy that my thoughts mentioned in the psABI (https://goo.gl/fgRa20) would be fulfilled as part of this big proposal.

--
Supra