Tony Ambardar 65c2043989 bpf: Prevent .BTF section elimination
Systems with memory or disk constraints often reduce the kernel footprint
by configuring LD_DEAD_CODE_DATA_ELIMINATION. However, this can result in
removal of any BTF information.

Use the KEEP() macro to preserve the BTF data as done with other important
sections, while still allowing for smaller kernels.

Fixes: 90ceddcb4950 ("bpf: Support llvm-objcopy for vmlinux BTF")
Signed-off-by: Tony Ambardar <Tony.Ambardar@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/a635b5d3e2da044e7b51ec1315e8910fbce0083f.1600417359.git.Tony.Ambardar@gmail.com
2020-09-21 21:50:44 +02:00
..
2017-11-15 13:28:48 -08:00
2020-08-07 10:33:50 -07:00
2019-09-17 14:30:30 -07:00
2020-06-03 15:13:47 -07:00
2020-01-23 10:41:16 -08:00
2018-03-09 23:19:56 +01:00
2018-05-07 07:15:41 +02:00
2020-08-07 10:33:50 -07:00
2020-08-12 10:57:58 -07:00