btf: remove symbol value bounds check to support vmlinux ELFs
btf: remove symbol value bounds check to support vmlinux ELFs

In vmlinux ELFs, symbol offsets can be (virtual) memory addresses which don't
necessarily correspond to offsets within ELF sections or even files.

The offsets collected here are used to fix up BTF datasecs later, which have
32-bit offset fields, making them unable to reference symbols in these
sections, so skip collecting them instead of throwing an error.

This allows the caller to specify an unstripped vmlinux TargetBTF and would
result in correct fallback behaviour to one of the files in /boot, /lib and
/usr as specified in loadKernelSpec(), which is currently broken.

.text and all of its symbols sit in the 0x..ff810.. range:
```
~ llvm-objdump -t /usr/lib/modules/*/build/vmlinux | head -5

/usr/lib/modules/5.15.17-1-lts/build/vmlinux:	file format elf64-x86-64

SYMBOL TABLE:
ffffffff81000000 l    d  .text	0000000000000000 .text
```

Explanation on why this is the case:
https://0xax.gitbooks.io/linux-insides/content/Theory/linux-theory-2.html#vmlinux

This kernel has only one Datasec:
```
~ bpftool btf dump file /usr/lib/modules/*/build/vmlinux
...
[107260] DATASEC '.data..percpu' size=209156 vlen=380
        type_id=5390 offset=4096 size=4096 (VAR 'cpu_debug_store')
...
```

It seems to be stored at a low offset within this section:
```
~ llvm-readelf -s /usr/lib/modules/*/build/vmlinux | grep cpu_debug_store
...
142762: 0000000000001000  4096 OBJECT  GLOBAL DEFAULT    37 cpu_debug_store
```

Signed-off-by: Timo Beckers <98c2d5a1e48c998bd9ba9dbc53d6857beae1c9bd@isovalent.com>

cilium/ebpf,cilium/ebpf