-
Notifications
You must be signed in to change notification settings - Fork 28
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
Analyse .rodata/go:embed content #44
Comments
This is certainly possible, and in fact existing methods based on decompilation already recognise some of them. |
The dwarf doesn't contain information about embed, maybe we still need some reverse engineering work. |
Keeping this issue open for now, as the new implementation is based on inversion and some assumptions, and it's not certain that the code will handle all real-world situations correctly. Expect feedback to fix it further. |
I see that my test binary now reduced unknown .rodata size from ~9MB to ~3MB. Good work, thanks. |
go:embed
stores its data in.rodata
section of the binary file.I am not sure if it's possible to extract all of the content of
.rodata
but it would be useful to at least have some idea about embedded content.As for example, lingua-go stores tremendous amounts of embeds, so
.rodata
will take up ~100Mb of the file.Information on the exact data structure is rather sparse but it's somewhat simple because we know what does the embedding (it is https://pkg.go.dev/embed)
See also:
The text was updated successfully, but these errors were encountered: