lkml.org 
[lkml]   [2021]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 01/15] selftests/x86/sgx: Fix a benign linker warning
On Thu, Oct 28, 2021, Dave Hansen wrote:
> On 10/28/21 1:37 PM, Reinette Chatre wrote:
> > From: Sean Christopherson <sean.j.christopherson@intel.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.

The SGX selftests use a custom linker script, tools/testing/selftests/sgx/test_encl.lds,
to configure the resulting enclave binary so that it's loadable as an enclave
more or less as-is. One of the things the script does is drop sections the
selftests doesn't want, .note* sections being in that category. I don't recall
exactly why the script drops sections; I assume it's to simply the loading process.
Anyways, .note.gnu.build-id is collateral damage and the linker complains.

\
 
 \ /
  Last update: 2021-10-29 16:56    [W:0.197 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site