-
-
Notifications
You must be signed in to change notification settings - Fork 623
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
How to Inject a PT_NOTE
Segment into an ELF Binary Without Original PT_NOTE
?
#981
Comments
Could you share the binary because on a simple import lief
ls = lief.ELF.parse("/bin/ls")
segment = lief.ELF.Segment()
segment.type = lief.ELF.SEGMENT_TYPES.NOTE
s = ls.add(segment)
print(s)
ls.write("./out.elf") |
I can confirm this issue when working with elf files created by IAR linker ilinkarm
Output is
|
Thank you for these details. Right now, LIEF assumes that at least one |
Hello!
I'm currently working with ELF binaries and have a specific requirement to inject a
PT_NOTE
segment into binaries that originally do not have this segment. I've been going through the LIEF documentation and examples, but I haven't found a straightforward method to achieve this.Details:
What I've tried:
But the resultant binary merely has a newly added
LOAD
segment, instead of aNOTE
one.Any guidance or pointers would be greatly appreciated.
Best
The text was updated successfully, but these errors were encountered: