[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fae97935-9642-5aad-b786-b068dbc0cff9@intel.com>
Date: Fri, 29 Oct 2021 10:11:06 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Reinette Chatre <reinette.chatre@...el.com>, jarkko@...nel.org,
linux-sgx@...r.kernel.org, shuah@...nel.org,
dave.hansen@...ux.intel.com
Cc: seanjc@...gle.com, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 01/15] selftests/x86/sgx: Fix a benign linker warning
On 10/29/21 10:09 AM, Reinette Chatre wrote:
> On 10/28/2021 5:26 PM, Dave Hansen wrote:
>> On 10/28/21 1:37 PM, Reinette Chatre wrote:
>>> From: Sean Christopherson <sean.j.christopherson@...el.com>
>>>
>>> Pass a build id of "none" to the linker to suppress a warning about the
>>> build id being ignored:
>>>
>>> /usr/bin/ld: warning: .note.gnu.build-id section discarded,
>>> --build-id
>>> ignored.
>>
>> Do we have a good grasp on why this is producing a warning in the first
>> place? This seems like something that could get merged quickly with one
>> more sentence in the changelog.
>>
>
> How about a new changelog as below:
>
> The enclave binary (test_encl.elf) is built with only three sections
> (tcs, text, and data) as controlled by its custom linker script.
>
> If gcc is built with "--enable-linker-build-id" (this appears to be a
> common configuration even if it is by default off) then gcc will pass
> "--build-id" to the linker that will prompt it (the linker) to to write
> unique bits identifying the linked file to a ".note.gnu.build-id" section.
>
> The section ".note.gnu.build-id" does not exist in the test enclave
> resulting in the following warning emitted by the linker:
>
> /usr/bin/ld: warning: .note.gnu.build-id section discarded, --build-id
> ignored
>
> The test enclave does not use the build id within the binary so fix the
> warning by passing a build id of "none" to the linker that will disable
> the setting from any earlier "--build-id" options and thus disable the
> attempt to write the build id to a ".note.gnu.build-id" section that
> does not exist.
Looks great, thanks for putting that together!
Powered by blists - more mailing lists