Skip to contentSkip to conversation

selftests/sgx: Fix a benign linker warning

PATCH In review Sean Christopherson 2 participants 2 messages Mar 30, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests/sgx: Fix a benign linker warning

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.
---
 tools/testing/selftests/sgx/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/sgx/Makefile +1 -1
index 95e5c4df8014..b0a47c695c19 100644
@@ -41,7 +41,7 @@ $(OUTPUT)/call.o: call.S
 	$(CC) $(HOST_CFLAGS) -c $< -o $@
 
 $(OUTPUT)/test_encl.elf: test_encl.lds test_encl.c test_encl_bootstrap.S
-	$(CC) $(ENCL_CFLAGS) -T $^ -o $@
+	$(CC) $(ENCL_CFLAGS) -T $^ -o $@ -Wl,--build-id=none
 
 EXTRA_CLEAN := \
 	$(OUTPUT)/test_encl.elf \
Signature · 1 line
2.24.1
#1 lore raw
Quoted 7 lines · Sean Christopherson

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.

Thanks. Got idea from this that the ELF format used in the test could be further refined with something like ".note.x86.tcs", which would contain the start offset and size of the TCS list.

/Jarkko