At runtime we don't care about the content of them, and we only need
them on host side to decode the trace buffer.
This also prevents the linker from adding a segment for these sections.
Because the resulting segment sometimes only contained these two
sections, the final `strip` step would end up with an empty segment.
And in the case of the linuxu platform the resulting image was not
working anymore.
Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu.moga@protonmail.com>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #833
#define __UK_TRACE_REG(NR, regname, trace_name, fmt, ...) \
UK_CTASSERT(sizeof(#trace_name) < 255); \
UK_CTASSERT(sizeof(fmt) < 255); \
- __attribute((__section__(".uk_tracepoints_list"))) \
+ __attribute((__section__( \
+ ".uk_tracepoints_list,\"\",@note#"))) \
static struct { \
uint32_t magic; \
uint32_t size; \
* $ readelf -p .uk_trace_keyvals <your_image.gdb>
*/
#define TRACE_DEFINE_KEY(key, val) \
- __attribute((__section__(".uk_trace_keyvals"))) \
+ __attribute((__section__( \
+ ".uk_trace_keyvals,\"\",@note#"))) \
static const char key[] __used = \
#key " = " #val