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

write/elf: Allow disabling unique names for subsection #409

Open
bjorn3 opened this issue Dec 15, 2021 · 2 comments
Open

write/elf: Allow disabling unique names for subsection #409

bjorn3 opened this issue Dec 15, 2021 · 2 comments

Comments

@bjorn3
Copy link
Contributor

bjorn3 commented Dec 15, 2021

Currently object writes elf files with section names like .text.foo and .text.bar for the foo and bar sections. Elf allows naming both sections .text. This can save a lot of space on section name strings.

An api I could imagine would be to use .text as section name if the base section name is .text and the subsection name is empty. Currently this would result in the name .text. and panic if there are multiple subsections for the same section due to the same section name being inserted into a StringTable more than once.

@philipc
Copy link
Contributor

philipc commented Dec 19, 2021

Should this apply to COFF too? Mach-O will be fine because the name is ignored anyway.

@philipc
Copy link
Contributor

philipc commented Dec 19, 2021

panic if there are multiple subsections for the same section due to the same section name being inserted into a StringTable more than once.

Can you elaborate? I don't see where this would happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants