Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants