Skip to content

Commit 11afa94

Browse files
authored
Merge pull request #37 from Decompollaborate/develop
2.7.4
2 parents 7ef5859 + 2b734ab commit 11afa94

43 files changed

Lines changed: 1995 additions & 1979 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [2.7.4] - 2025-03-19
11+
12+
### Fixed
13+
14+
- Fix size calculation for the last symbol of a section not properly accounting
15+
if the first symbol of said section is a `static` symbol (meaning it is
16+
missing from the mapfile).
17+
- This fix only applies to GNU mapfiles.
18+
1019
## [2.7.3] - 2025-02-09
1120

1221
### Fixed
@@ -453,6 +462,7 @@ Full changes: <https://github.com/Decompollaborate/mapfile_parser/compare/702a73
453462
- Initial release
454463

455464
[unreleased]: https://github.com/Decompollaborate/mapfile_parser/compare/master...develop
465+
[2.7.4]: https://github.com/Decompollaborate/mapfile_parser/compare/2.7.3...2.7.4
456466
[2.7.3]: https://github.com/Decompollaborate/mapfile_parser/compare/2.7.2...2.7.3
457467
[2.7.2]: https://github.com/Decompollaborate/mapfile_parser/compare/2.7.1...2.7.2
458468
[2.7.1]: https://github.com/Decompollaborate/mapfile_parser/compare/2.7.0...2.7.1

Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ crate-type = ["cdylib", "staticlib", "rlib"]
2323

2424
[dependencies]
2525
regex = "1.10.2"
26-
pyo3 = { version = "0.23.2", optional = true, features = ["extension-module"]}
26+
pyo3 = { version = "0.23.5", optional = true, features = ["extension-module"]}
2727
lazy_static = "1.4.0"
2828
serde = { version = "1.0", features = ["derive"], optional = true }
2929

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ If you use a `requirements.txt` file in your repository, then you can add
3535
this library with the following line:
3636

3737
```txt
38-
mapfile_parser>=2.7.3,<3.0.0
38+
mapfile_parser>=2.7.4,<3.0.0
3939
```
4040

4141
#### Development version
@@ -74,7 +74,7 @@ cargo add mapfile_parser
7474
Or add the following line manually to your `Cargo.toml` file:
7575

7676
```toml
77-
mapfile_parser = "2.7.3"
77+
mapfile_parser = "2.7.4"
7878
```
7979

8080
## Versioning and changelog

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[project]
55
name = "mapfile_parser"
6-
version = "2.7.3"
6+
version = "2.7.4"
77
description = "Map file parser library focusing decompilation projects"
88
readme = "README.md"
99
requires-python = ">=3.9"

src/mapfile_parser/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from __future__ import annotations
77

8-
__version_info__ = (2, 7, 3)
8+
__version_info__ = (2, 7, 4)
99
__version__ = ".".join(map(str, __version_info__))# + "-dev0"
1010
__author__ = "Decompollaborate"
1111

src/rs/mapfile.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,12 @@ impl MapFile {
285285
// of the file.
286286
if let Some(first_sym) = file.symbols.first() {
287287
sym_vrom += first_sym.vram - file.vram;
288+
289+
// Aditionally, if the first symbol is missing then calculation of the size
290+
// for the last symbol would be wrong, since we subtract the accumulated
291+
// size of each symbol from the section's total size to calculate it.
292+
// We need to adjust the total size by this difference too.
293+
acummulated_size += first_sym.vram - file.vram;
288294
}
289295

290296
// Calculate size of each symbol

tests/output/animalforest.jp.csv

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/output/animalforest.jp.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/output/animalforest.jp.machine.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)