From owner-freebsd-arch@FreeBSD.ORG Thu Aug 14 06:07:24 2014 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3598E5CF; Thu, 14 Aug 2014 06:07:24 +0000 (UTC) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2lp0243.outbound.protection.outlook.com [207.46.163.243]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB9D82644; Thu, 14 Aug 2014 06:07:23 +0000 (UTC) Received: from CO2PR05CA014.namprd05.prod.outlook.com (10.141.241.142) by BY2PR05MB725.namprd05.prod.outlook.com (10.141.223.13) with Microsoft SMTP Server (TLS) id 15.0.1005.10; Thu, 14 Aug 2014 06:07:13 +0000 Received: from BN1BFFO11FD036.protection.gbl (2a01:111:f400:7c10::1:148) by CO2PR05CA014.outlook.office365.com (2a01:111:e400:1429::14) with Microsoft SMTP Server (TLS) id 15.0.1005.10 via Frontend Transport; Thu, 14 Aug 2014 06:07:12 +0000 Received: from P-EMF01-SAC.jnpr.net (66.129.239.15) by BN1BFFO11FD036.mail.protection.outlook.com (10.58.144.99) with Microsoft SMTP Server (TLS) id 15.0.1010.11 via Frontend Transport; Thu, 14 Aug 2014 06:07:10 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF01-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Wed, 13 Aug 2014 23:06:47 -0700 Received: from idle.juniper.net (idleski.juniper.net [172.25.4.26]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id s7E66gn92493; Wed, 13 Aug 2014 23:06:44 -0700 (PDT) (envelope-from phil@juniper.net) Received: from idle.juniper.net (localhost [127.0.0.1]) by idle.juniper.net (8.14.4/8.14.3) with ESMTP id s7E66XXA091972; Thu, 14 Aug 2014 02:06:33 -0400 (EDT) (envelope-from phil@idle.juniper.net) Message-ID: <201408140606.s7E66XXA091972@idle.juniper.net> To: Konstantin Belousov Subject: Re: XML Output: libxo - provide single API to output TXT, XML, JSON and HTML In-Reply-To: <20140814052648.GM2737@kib.kiev.ua> Date: Thu, 14 Aug 2014 02:06:33 -0400 From: Phil Shafer MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:66.129.239.15; CTRY:US; IPV:NLI; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(189002)(164054003)(199003)(74662001)(46102001)(50986999)(76506005)(99396002)(31966008)(21056001)(74502001)(79102001)(76482001)(53416004)(68736004)(69596002)(44976005)(81156004)(6806004)(54356999)(105596002)(77982001)(103666002)(86362001)(107046002)(83322001)(1411001)(102836001)(48376002)(20776003)(95666004)(50466002)(85306004)(92726001)(64706001)(47776003)(4396001)(92566001)(87936001)(106466001)(85852003)(83072002)(97736001)(84676001)(80022001)(81542001)(110136001)(81342001); DIR:OUT; SFP:; SCL:1; SRVR:BY2PR05MB725; H:P-EMF01-SAC.jnpr.net; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;UriScan:; X-Forefront-PRVS: 03030B9493 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.15 as permitted sender) Authentication-Results: spf=softfail (sender IP is 66.129.239.15) smtp.mailfrom=phil@juniper.net; X-OriginatorOrg: juniper.net Cc: arch@freebsd.org, Poul-Henning Kamp , marcel@freebsd.org, John-Mark Gurney , "Simon J. Gerraty" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 06:07:24 -0000 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