splat64 0.34.1__py3-none-any.whl → 0.34.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
splat/__init__.py CHANGED
@@ -1,7 +1,7 @@
1
1
  __package_name__ = __name__
2
2
 
3
3
  # Should be synced with pyproject.toml
4
- __version__ = "0.34.1"
4
+ __version__ = "0.34.3"
5
5
  __author__ = "ethteck"
6
6
 
7
7
  from . import util as util
@@ -92,6 +92,9 @@ class CommonSegTextbin(CommonSegment):
92
92
  f.write(f'.incbin "{binpath.as_posix()}"\n')
93
93
 
94
94
  if sym is not None:
95
+ if options.opts.asm_emit_size_directive:
96
+ f.write(f".size {sym.name}, . - {sym.name}\n")
97
+
95
98
  if self.is_text() and options.opts.asm_end_label != "":
96
99
  f.write(f"{options.opts.asm_end_label} {sym.name}\n")
97
100
 
splat/segtypes/segment.py CHANGED
@@ -414,6 +414,26 @@ class Segment:
414
414
 
415
415
  ret.parent = parent
416
416
 
417
+ # Import here to avoid circular imports
418
+ from .common.code import CommonSegCode
419
+ from .common.bss import CommonSegBss
420
+
421
+ if options.opts.ld_bss_is_noload and isinstance(ret, CommonSegBss):
422
+ # We need to know the bss space for the segment.
423
+ if isinstance(parent, CommonSegCode):
424
+ if parent.bss_size <= 0:
425
+ log.error(
426
+ f"Top-level segment '{parent.name}' is missing a `bss_size` value.\n A non-zero `bss_size` value must be defined on the top-level segments that contain '{ret.type}' sections (produced by the '{ret.name}' section)."
427
+ )
428
+ if (
429
+ isinstance(ret.vram_start, int)
430
+ and isinstance(parent.vram_end, int)
431
+ and ret.vram_start >= parent.vram_end
432
+ ):
433
+ log.error(
434
+ f"The section '{ret.name}' (vram 0x{ret.vram_start:08X}) is outside its parent's address range '{parent.name}' (0x{parent.vram_start:08X} ~ 0x{parent.vram_end:08X}).\n This may happen when the specified `bss_size` value is too small."
435
+ )
436
+
417
437
  ret.given_section_order = parse_segment_section_order(yaml)
418
438
  ret.given_subalign = parse_segment_subalign(yaml)
419
439
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: splat64
3
- Version: 0.34.1
3
+ Version: 0.34.3
4
4
  Summary: A binary splitting tool to assist with decompilation and modding projects
5
5
  Project-URL: Repository, https://github.com/ethteck/splat
6
6
  Project-URL: Issues, https://github.com/ethteck/splat/issues
@@ -76,7 +76,7 @@ The brackets corresponds to the optional dependencies to install while installin
76
76
  If you use a `requirements.txt` file in your repository, then you can add this library with the following line:
77
77
 
78
78
  ```txt
79
- splat64[mips]>=0.34.1,<1.0.0
79
+ splat64[mips]>=0.34.3,<1.0.0
80
80
  ```
81
81
 
82
82
  ### Optional dependencies
@@ -1,4 +1,4 @@
1
- splat/__init__.py,sha256=5wCRNvmA64KRVk8KGG4Kk3C9PltHiwgfFf_FxkNA_Pw,291
1
+ splat/__init__.py,sha256=rs-XlFGaAdeRR2HH39ZlivuX9gxbNCbXUC7SGTt7kks,291
2
2
  splat/__main__.py,sha256=T333dHDgr-2HYYhtARnYMEjdECnYiNIKfcXDD99o22A,732
3
3
  splat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  splat/disassembler/__init__.py,sha256=IubLMnm_F5cZ7WUPBfk1VJ7vdj6i1if5GG6RBvEoBEA,226
@@ -18,7 +18,7 @@ splat/scripts/create_config.py,sha256=nFwIt1UWzlWE9C3i-2dGsVyGX2cuXzIqkp2kur2-pd
18
18
  splat/scripts/split.py,sha256=pzNPJRy11YwIA_2wbRYU2m-zIfBRpo2RySJ9nKVBqRI,19433
19
19
  splat/segtypes/__init__.py,sha256=-upUw_4JGQtvyp6IfTMzOq_CK3xvVaT_0K0_EipHyOo,208
20
20
  splat/segtypes/linker_entry.py,sha256=e2IzjAWC1B_JCx5pxBdKJrzOCse4SYUBrLHM8l3AR3o,24765
21
- splat/segtypes/segment.py,sha256=pWpX_PqPCRo8ZFVhqoiYcopzuAyB8PnKa0euEGUV5qc,29094
21
+ splat/segtypes/segment.py,sha256=UByBPNSNb5AThjx2J9PspeQALobc-4_jh0qKQ9ycEjg,30281
22
22
  splat/segtypes/common/__init__.py,sha256=mnq0acScilSCCo6q2PvkDk0Or3V8qitA7I8QMVw8haI,631
23
23
  splat/segtypes/common/asm.py,sha256=k3p4vgbQJP40iyTgQkIci1j3CpKkWksqoWBx2Pb2oh8,703
24
24
  splat/segtypes/common/asmtu.py,sha256=C52kKh-8YeDHu0EucEfQ-tQMtDgfKfwAJ6wwiW6nOBU,354
@@ -44,7 +44,7 @@ splat/segtypes/common/rodatabin.py,sha256=uqp60QuwHwvlMwHq0nZrU3y3yYcHbv2twT0PID
44
44
  splat/segtypes/common/sbss.py,sha256=blIEuVYie4qNEOYMmlSdltn5f4MvgJu3AV8vqVD8Nh4,131
45
45
  splat/segtypes/common/sdata.py,sha256=dnLzNSNtSyclLZiNUmFTv0e0BWN8glxB1km1MSRq6xY,136
46
46
  splat/segtypes/common/segment.py,sha256=vVFyFjs-gS5qIWO8Pd0pMJYxboP-iBRKvxcDV8YxdYM,94
47
- splat/segtypes/common/textbin.py,sha256=Xj-PxEDTN8f0DLgdZ2uA26SYCcXD3rqqr2r6-pEiA4Y,4578
47
+ splat/segtypes/common/textbin.py,sha256=wDc-951nci08nz1Gb_DByMTAKwsyT4wQD5m4ZQRdD7o,4695
48
48
  splat/segtypes/n64/__init__.py,sha256=tf2yWlijeKmOp1OhEEL-aW88mU-mWQRC2lSjQ5Ww1eI,569
49
49
  splat/segtypes/n64/ci.py,sha256=An7wIHcoZ89KiGCKpCRbM7IrmDNYBidXT-6kjKn2vH0,2400
50
50
  splat/segtypes/n64/ci4.py,sha256=ZP8e12CpV8U7r8oLnb9uHc-MkmBbxjXBbJxROFvOjiM,184
@@ -94,8 +94,8 @@ splat/util/n64/find_code_length.py,sha256=uUoPoUORAjsAvH8oGqwnGvw6j8I_NnSrZtA-x9
94
94
  splat/util/n64/rominfo.py,sha256=U6TieblUAmxhZsn7u8nbjOKkbC6ygsC_7IiLLaOWwUE,14646
95
95
  splat/util/psx/__init__.py,sha256=kCCaR-KB1mNlIcXB4OuuSQ2zVLbWg_SnIZIUeyjeBBI,39
96
96
  splat/util/psx/psxexeinfo.py,sha256=MrxY28nes0uzpFmCz0o9JFbF8s1eQRQNOpC_82wsMVI,5725
97
- splat64-0.34.1.dist-info/METADATA,sha256=WATpGC8bfgKAPc5XzA_aUB7Iib55DdqNVPxIWTkSF2s,3830
98
- splat64-0.34.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
99
- splat64-0.34.1.dist-info/entry_points.txt,sha256=O7Xy-qNOHcI87-OQrWJ-OhRDws74SuwVb_4rtnp0eLo,52
100
- splat64-0.34.1.dist-info/licenses/LICENSE,sha256=97VMVzjG8yQvsf8NG2M9IFSbh7R8cifJnc6QK1cZqj8,1070
101
- splat64-0.34.1.dist-info/RECORD,,
97
+ splat64-0.34.3.dist-info/METADATA,sha256=xhykQMnkqSDdoSyfjO3ovNl0-eDvHyFUR-u26YlYa_E,3830
98
+ splat64-0.34.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
99
+ splat64-0.34.3.dist-info/entry_points.txt,sha256=O7Xy-qNOHcI87-OQrWJ-OhRDws74SuwVb_4rtnp0eLo,52
100
+ splat64-0.34.3.dist-info/licenses/LICENSE,sha256=97VMVzjG8yQvsf8NG2M9IFSbh7R8cifJnc6QK1cZqj8,1070
101
+ splat64-0.34.3.dist-info/RECORD,,