Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

ELFError::MultipleTextSections is misleading, it can be thrown for zero sections #220

Closed
ruuda opened this issue Oct 18, 2021 · 1 comment · Fixed by #223
Closed

ELFError::MultipleTextSections is misleading, it can be thrown for zero sections #220

ruuda opened this issue Oct 18, 2021 · 1 comment · Fixed by #223
Assignees
Labels
bug Something isn't working

Comments

@ruuda
Copy link

ruuda commented Oct 18, 2021

There is the error ELFError::MultipleTextSections:

Multiple text sections, consider removing llc option: -function-sections

Which is returned in a single place, here:

rbpf/src/elf.rs

Lines 363 to 365 in b40643e

if 1 != num_text_sections {
return Err(ELFError::MultipleTextSections);
}

The error message and name are misleading, because it can also be thrown when there is no text section at all. @enriquefynn and me just discovered this the hard way.

@Lichtso
Copy link

Lichtso commented Nov 10, 2021

Yes, that should be fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants