ietf-wg-bpf / ebpf-docs

eBPF Standard Documentation
42 stars 5 forks source link

Is a `.text` section required, even if empty? #22

Closed hawkinsw closed 1 year ago

hawkinsw commented 1 year ago

https://github.com/ietf-wg-bpf/ebpf-docs/blob/47c98affe555e5315ffcbaf6ea9e894eadda9b9c/rst/elf.rst?plain=1#L39

As far as I can tell from reading the ELF specification, there is no requirement that a .text section exist. Yes, a section named .text is reserved for the system, but I can find nothing that says it must exist.

Empirical evidence gathered by using --rename-section from objcopy seems to confirm this reading.

Will this supplement to the ELF spec require that a .text section exist, even if empty?

(Having said all that, I could be completely off base -- if so, I am sorry!)

hawkinsw commented 1 year ago

@dthaler Thank you for addressing!! I am closing.