-
Notifications
You must be signed in to change notification settings - Fork 508
Comparing changes
Open a pull request
base repository: eliben/pyelftools
base: main
head repository: mefistotelis/pyelftools
compare: master
- 13 commits
- 4 files changed
- 1 contributor
Commits on Jan 11, 2023
-
Fixed name of stringtable section
The section name can be set only after the section itself is parsed.
Configuration menu - View commit details
-
Copy full SHA for b5c6ec6 - Browse repository at this point
Copy the full SHA b5c6ec6View commit details -
Added saving changes to the main header
Introduced write_changes() function, which is able to write any changes to main header back into the ELF file. The write_changes() function can be further updated to allow storing more changes.
Configuration menu - View commit details
-
Copy full SHA for 947e9bb - Browse repository at this point
Copy the full SHA 947e9bbView commit details -
Added saving changes to section header
With this patch, it is possible to modify data within section headers of the ELF file, and store the changes back to the ELF.
Configuration menu - View commit details
-
Copy full SHA for 3fc1adc - Browse repository at this point
Copy the full SHA 3fc1adcView commit details -
Added saving changes to section data
Added set_data() function which allows to replace a section data with a new buffer. This partially implements modification of section data, because it lacks higher level logic (like avoiding overlapping of sections).
Configuration menu - View commit details
-
Copy full SHA for b633fff - Browse repository at this point
Copy the full SHA b633fffView commit details -
Implement writing section data back to file
Creates function to write section data, and uses it. While at it, also adds a function which returns whether the data for a section was updated.
Configuration menu - View commit details
-
Copy full SHA for 2539f86 - Browse repository at this point
Copy the full SHA 2539f86View commit details -
Assume section type SHT_NOBITS has no data
Adds conditions to make sure NOBITS sections are not using write as normal sections. These do not contain any data. During read (the data() function), this type of section is already handled properly.
Configuration menu - View commit details
-
Copy full SHA for 773194d - Browse repository at this point
Copy the full SHA 773194dView commit details -
Implement writing segments back to file
Creates functions for writing segments array back to file after the segments have been modified.
Configuration menu - View commit details
-
Copy full SHA for df8b568 - Browse repository at this point
Copy the full SHA df8b568View commit details -
Return a copy of local update structs instead of direct references. This prevents the data from being modified without the parser knowledge.
Configuration menu - View commit details
-
Copy full SHA for 0dab07a - Browse repository at this point
Copy the full SHA 0dab07aView commit details -
Implement replacing a section with completely new data
This implements replacing a whole section in ELF file with a new one. It can correctly recompute offsets of other sections, and update segments.
Configuration menu - View commit details
-
Copy full SHA for b4a32ca - Browse repository at this point
Copy the full SHA b4a32caView commit details -
Added merging segments divided during sections update
This patch improves update_segments_to_sections_mapping() and introduces _reorder_segment_headers(), which are able to merge equivalent and touching segments.
Configuration menu - View commit details
-
Copy full SHA for a1a5ea5 - Browse repository at this point
Copy the full SHA a1a5ea5View commit details -
Implemented adding new sections
It is now possible to insert a new section, either by copying and changing one of existing sections, or by creating a completely new section object. Section name is stored in the names section, but in case of renaming the old name is not removed.
Configuration menu - View commit details
-
Copy full SHA for 6774361 - Browse repository at this point
Copy the full SHA 6774361View commit details -
Fixed special treating of stringtable section
The string section is required for many operations, so its copy was stored within the object. That additional copy was not updated when neccessary, which was causing bugs.
Configuration menu - View commit details
-
Copy full SHA for 73589e3 - Browse repository at this point
Copy the full SHA 73589e3View commit details -
When inserting a section, place its header correctly
Inserting a section allowed to set any offset where the section header should be placed. That was silly, because when inserting a section we provide info about at which position to place it. This change sets the section header offset automatically, placing it after previous section provided as parameter. The offset is just previous section + 1 byte; then linearizing function makes sure it is shifted further so that everything fits.
Configuration menu - View commit details
-
Copy full SHA for 99091d1 - Browse repository at this point
Copy the full SHA 99091d1View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...master