Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 2014 02:06:33 -0400
From:      Phil Shafer <phil@juniper.net>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        arch@freebsd.org, Poul-Henning Kamp <phk@phk.freebsd.dk>, marcel@freebsd.org, John-Mark Gurney <jmg@funkthat.com>, "Simon J. Gerraty" <sjg@juniper.net>
Subject:   Re: XML Output: libxo - provide single API to output TXT, XML, JSON and HTML
Message-ID:  <201408140606.s7E66XXA091972@idle.juniper.net>
In-Reply-To: <20140814052648.GM2737@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Konstantin Belousov writes:
>Yes, the notes are used to communicate the information required by
>the dynamic linker to correctly activate the image. The mechanism has
>nothing to do with application-specific features, and overloading it for
>that purpose is severe and pointless layering violation.

The ELF spec says:

    Note Section

    Sometimes a vendor or system builder needs to mark an object
    file with special information that other programs will check
    for conformance, compatibility, etc. Sections of type SHT_NOTE
    and program header elements of type PT_NOTE can be used for
    this purpose. The note information in sections and program
    header elements holds any number of entries, each of which is
    an array of 4-byte words in the format of the target processor.
    Labels appear below to help explain note information organization,
    but they are not part of the specification.

Marking the binary with a libxo-specific note tells the caller that
the binary is capable of rendering its output in a non-traditional
style and gives the caller a means of triggering those styles of
output.  In the libxo-enabled world, I see this as vital information
the caller needs to initialize the environment in which the command
will be run.  Isn't this exactly the sort of information ELF targets
for note sections?

Thanks,
 Phil



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408140606.s7E66XXA091972>