From 3f3aa50275181d2ff688a8828a8648ae51a39355 Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum Date: Sat, 31 Aug 2024 19:14:25 -0700 Subject: [PATCH] let tracepoint info section inherit section group Summary: Originally submitted by github user aliher1911 https://github.com/aliher1911 in: https://github.com/aliher1911. However, the files were moved around and the importer cannot import this PR. Original description: > When section group is inherited from the function where tracepoint is defined, tracepoint definition could be discarded by linker together with function correctly. Otherwise tracepoint would reference discarded section and cause linker to fail as in https://github.com/facebook/folly/issues/1395. Closes: https://github.com/facebook/folly/pull/1396. Fixes: https://github.com/facebook/folly/issues/1395. Fixes: https://github.com/facebook/fbthrift/issues/384. Reviewed By: Orvid Differential Revision: D62073054 fbshipit-source-id: d75de3f3c37d3110ae5bc88cd0b6c3de5ebe331f --- folly/tracing/StaticTracepoint-ELF.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/tracing/StaticTracepoint-ELF.h b/folly/tracing/StaticTracepoint-ELF.h index 851472d128b..4901da51593 100644 --- a/folly/tracing/StaticTracepoint-ELF.h +++ b/folly/tracing/StaticTracepoint-ELF.h @@ -131,7 +131,7 @@ // Structure of note section for the probe. #define FOLLY_SDT_NOTE_CONTENT(provider, name, has_semaphore, arg_template) \ FOLLY_SDT_ASM_1(990: FOLLY_SDT_NOP) \ - FOLLY_SDT_ASM_3( .pushsection .note.stapsdt,"","note") \ + FOLLY_SDT_ASM_3( .pushsection .note.stapsdt,"?","note") \ FOLLY_SDT_ASM_1( .balign 4) \ FOLLY_SDT_ASM_3( .4byte 992f-991f, 994f-993f, FOLLY_SDT_NOTE_TYPE) \ FOLLY_SDT_ASM_1(991: .asciz FOLLY_SDT_NOTE_NAME) \