Skip to content

Latest commit

 

History

History
1431 lines (934 loc) · 41.9 KB

CHANGELOG.md

File metadata and controls

1431 lines (934 loc) · 41.9 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Added

  • Add --name-vars-by-file option to rename data symbols based on their offset and in their containing file.
  • Add --name-vars-by-section considers the .text and .ovl/.reloc sections.
    • For unknown .text symbols (that are not functions, or any kind of label) the T_ prefix will be used.
    • For .ovl/.reloc symbols the REL_ prefix will be used

Changed

  • File splits can now contain reloc sections (.ovl or .reloc).
  • Type-based name generation (--name-vars-by-type) can now be mixed with other kinds of name generations, allowing to give extra information on the symbol name.
  • Autogenerated symbol names will not use a suffix if said symbol is generated after another symbol or file.
  • Do not try to symbolize an address as a symbol plus addend if the original address is a banned address.
  • Recognize volatile type variants as aliases for the non volatile versions.
    • For example, vs16 is recognized as a .short.

1.19.0 - 2023-12-04

Added

  • Try to detect when instructions are setting the $gp register with the passed GP_VALUE and use the _gp symbol instead of symbolizing an unrelated symbol.
    • This check is only applied on non PIC mode.
  • Track if a symbol is accessed with a %gp_rel.
  • Add --sequential-label-names option to rename branch and jump table labels after their containing function (#142).
    • Thanks @cadmic

Changed

  • Emit which symbol produced the generation of an automatically generated and unused pad.
  • Change how the variables csv file is parsed: If the size column is either empty, a dash (-) or zero then that column is ignored.
  • Autogenerated symbol names are now padded up to 8 hex digits, contrary to the old 6 hex digits.
    • Since this may be a breaking change for some people the old functionallity can be restored by enabling the GlobalConfig.LEGACY_SYM_ADDR_ZERO_PADDING setting, or by passing --legacy-sym-addr-zero-padding when invoking a command line front-end.

Deprecated

  • GlobalConfig.LEGACY_SYM_ADDR_ZERO_PADDING (and the CLI version --legacy-sym-addr-zero-padding) are deprecated.
    • There's no replacement for this option.

Fixed

  • Avoid using the wrong immediate for gp-relative references if the address could not be symbolized.
    • In example, if said address is outside of the known address range.
  • Fix some niche cases where spimdisasm may emit duplicated data symbol labels but without their data.

1.18.0 - 2023-10-29

Added

  • Add option to rename the sections generated by FunctionRodataEntry
    • FunctionRodataEntry.sectionText to rename the .text section
    • FunctionRodataEntry.sectionRodata to rename the .rodata section
    • FunctionRodataEntry.sectionLateRodata to rename the .late_rodata section

1.17.4 - 2023-10-07

Added

  • Add CHANGELOG.md

Fixed

  • Fix not decoding some valid Japense strings on decodeBytesToStrings
    • Specifically SHIFT-JIS ones with raw characters 0x8C and 0x8D

1.17.3 - 2023-09-18

Changed

  • Hardcodes a check to avoid disassembling .vutext. This will be changed in a future release.
    • Fixes .vutext sections from PS2 elfs messing with symbol analyzis

Fixed

  • Fix .double disassembly for little endian

1.17.2 - 2023-09-18

Uncategorized

  • Dummy update, sorry

1.17.1 - 2023-09-15

Added

  • Option to set the filtering addresses for the symbol finder

Changed

  • Tweak endlabel to be emitted in the same place as the size directive does
  • Emit global labels for symbols with no type in the middle of functions
  • Consider the j instruction as a function end if rabbitizer's --j-branch option is turned off
  • Always migrate mips1 doubles when migrating rodata

Fixed

  • Add checks for $rs and $rt registers instead of assuming they are used to avoid crashing during runtime.

1.17.0 - 2023-08-27

Changed

  • Allow using MIPS_NONE reloc type as a way to avoid symbolizing a reference and use the raw value instead.
  • Allow using a different label for symbols in the middle of functions.
    • Useful for setting alternative entry points for handwritten functions.
    • It can be used by setting the ASM_TEXT_ALT_LABEL.

Fixed

  • Fix elfObjDisasm crashing if a reloc section references an unhandled section like .pdr.

1.16.5 - 2023-08-22

Changed

  • Do not use iQue symbols by default if user asked only for libultra symbols

1.16.4 - 2023-08-19

Added

  • Try to gather the $gp register value from non-PIP elfs too
  • Detect ABI and cpu flags from elf header.

Changed

  • Do not use mips1 double detection heuristic on non o32 abis

Fixed

  • Various bugfixes related to j instructions being used as a way to call another function.
  • Fix size directive not being properly emitted for functions with user-declared size that has dangling nops.
  • Avoid warning about LOCAL NOTYPE symbols in elf files

1.16.3 - 2023-08-15

Fixed

  • Fix hex comment crashing because of doubles when parsing little endian binaries

1.16.2 - 2023-08-14

Added

  • Generate pad symbols to honor user declared sizes
    • Symbols will be automatically splitted if the user-declared size is smaller than the symbol size (usually due to size not being a multiple of 4, file splits, other symbols not being referenced, etc)
  • Add the character 0x1A to set of special cases for string decoding.

Changed

  • Workaround for big addends when building with modern GAS

Fixed

  • Fix size directive not using the right label when symbols are smaller than a word
  • Fix size directive not being properly emitted for symbols with a size smaller than a word
  • Fix bug which produced reporting incorrect file splits on strings which their last word was a zero.

1.16.0 - 2023-07-23

Added

  • Add a detector for the redundant function end produced by IDO with some specific flag combinations.
    • It is turned off by default, but it can be turned on globally with --detect-redundant-function-end, or globally and per file via the API.

Fixed

  • Fix BSS sections not emitting a first symbol if it isn't referenced anywhere.

1.15.4 - 2023-07-14

Changed

  • Avoid taking into account invalid instructions when trying to find function boundaries.

Fixed

  • Properly honor size of user-declared symbols for elf static symbols.

1.15.3 - 2023-07-10

Changed

  • Don't append the section name if it is known when disassembling elfs
    • This special cases the sections .text, .data, .rodata and .bss.
    • Avoids the redundant filename_.text/ naming scheme

1.15.2 - 2023-07-04

Fixed

  • Fix hardcoded shift value in alignment directive

1.15.1 - 2023-07-04

Changed

  • Emit string alignment directives even when the section isn't aligned to a multiple of 8.
    • Some projects can have rodata sections aligned to just a multiple of 4, and not emitting the directive in those cases can break their builds

1.15.0 - 2023-07-03

Added

  • Implement string guesser for the data section.
    • Controlled by the API GlobalConfig.DATA_STRING_GUESSER_LEVEL or via the CLI --data-string-guesser level.
    • Decodes strings with the ASCII encoding by default.
    • The meaning of each level are the same as the rodata string guesser.
    • The level defaults to 2.
  • Add experimental Pascal string guesser.
    • Works for both rodata and data sections.
    • Follows the same level logic as the C string guesser.
    • It is disabled by default.

Changed

  • Change the string guesser to work with multiple levels instead of plainly enabled/disabled and the aggressive toggle.
    • The new option is used via the API GlobalConfig.RODATA_STRING_GUESSER_LEVEL or via the CLI --rodata-string-guesser level.
    • Meaning of the new levels:
      • level 0: Completely disable the guessing feature.
      • level 1: The most conservative guessing level. Imposes the following restrictions:
        • Do not try to guess if the user provided a type for the symbol.
        • Do no try to guess if type information for the symbol can be inferred by other means.
        • A string symbol must be referenced only once.
        • Strings must not be empty.
      • level 2: A string no longer needs to be referenced only once to be considered a possible string. This can happen because of a deduplication optimization.
      • level 3: Empty strings are allowed.
      • level 4: Symbols with autodetected type information but no user type information can still be guessed as strings.
    • The level defaults to 1.
  • Start emitting .size directives by default.
  • Emit jlabel instead of dlabel for jumptable labels by default
  • Emit dlabel instead of dlabel for data, rodata and bss symbols by default

Deprecated

  • The old GlobalConfig.STRING_GUESSER and GlobalConfig.AGGRESSIVE_STRING_GUESSER options are now deprecated, same as the CLI options --string-guesser and --aggressive-string-guesser.
    • The old GlobalConfig.STRING_GUESSER = True is equivalent to the new GlobalConfig.RODATA_STRING_GUESSER_LEVEL = 1
    • The old GlobalConfig.AGGRESSIVE_STRING_GUESSER = True is equivalent to the new GlobalConfig.RODATA_STRING_GUESSER_LEVEL = 4

1.14.3 - 2023-06-19

Added

  • Failcheck for non aligned doubles

Changed

  • elfObjDisasm: Can now disassemble sections with arbitrary names
  • disasmdis: Disable pseudo instructions by default

Fixed

  • (Hopefully) Fix same-vram overlays using symbols from other overlays

1.14.2 - 2023-06-10

Changed

  • Actually add py.typed to pyproject.toml
  • Use bytearray as little as possible

Deprecated

  • writeBytearrayToFile is now deprecated, use writeBytesToFile instead

1.14.1 - 2023-06-10

Added

  • Emit a previous alignment directive for strings.
    • Ensures strings are always word aligned
  • Add py.typed file. Whoops

Changed

  • Purge .balign directive in favor of .align directive

1.14.0 - 2023-05-10

Added

  • Implement --dyn-syms on readelf-like mode.

Changed

  • Improve a bit support for N32 PIC programs.
    • The current issue was spimdisasm was not able to properly generate symbol references for $gp accesses.
    • GOT table now gets its own address from the reginfo instead of the dynamic table.
    • Accesses pointing outside the GOT table are tried to be redirected to sdata, srdata and sbss sections.
  • Minor improvements to readelf output format

1.13.3 - 2023-05-05

Fixed

  • Fix not writing to subfolders properly when a csv filesplit entry has a slash on its name.

1.13.2 - 2023-05-01

Added

  • Add support for .dummy section in csv file split format
  • Add readelf's --section-headers flag to elfObjDisasm

1.13.1 - 2023-04-30

Added

  • Add note about R3000GTE and R5900 instruction set support in the README

Fixed

  • Fix a possible None case in getInstrCategoryFromStr

1.13.0 - 2023-04-30

Added

  • Add support for R3000GTE

1.12.5 - 2023-04-28

Added

  • Add --function-info flag to elfObjDisasm
  • Option for emitting `.size`` directives in the generated assembly
    • Add --asm-emit-size-directive flag to emit size directives on generated assembly

Fixed

  • Fix jumptable end detection algorithm on vram ranges different than 0x80XXXXXX

1.12.4 - 2023-04-19

Fixed

  • Fix user-declared relocs having an incorrect addend

1.12.3 - 2023-04-18

Fixed

  • Fix conflicting -V flag

1.12.2 - 2023-04-18

Added

  • Add --version flag to every cli tool
  • Properly detect -mips1 double literals
    • Fixes issue #57

Changed

  • Emit a comment saying if a reloc is a global one when the emit relocs flag is passed

Fixed

  • Fix data symbols not using local reloc overrides
  • Fix .words not being updated after clearing pointers
  • Some pointer clearing fixes
  • Fix data not being properly disassembled on singleFileDisasm
  • Enforce UTF-8 encoding on generated asm files (PR #111)
    • Thanks to @1superchip
  • Fix incorrect addends on non static symbols from elf files.
    • Fixes issue #110
  • Fix a regression where some %lo symbols weren't being properly paired because of the %got being reused on PIC code
  • Fix sizes for inferred types

1.12.1 - 2023-03-28

Fixed

  • Fix addends bigger than 0x7FFF and smaller than 0x10000

1.12.0 - 2023-03-21

Added

  • Expose known types to spimdisasm via common.gKnownTypes

Changed

  • Improve handling static (local) symbols for non relocated elf object files
  • Fake/non used symbols are not longer emitted when disassembling elf .o files

Fixed

  • Prevents referencing labels and jumptable labels with addends
  • Prevents referencing labels and jumptable labels in non jumptable symbols

1.11.6 - 2023-03-10

Added

  • Add flag to specify instruction category in elfObjDisasm and singleFileDisasm
  • Add ContextSymbol.userDeclaredType and ContextSymbol.autodetectedType

Deprecated

  • Deprecate ContextSymbol.type
    • .type is kept as a property to provide backwards compatibility

1.11.5 - 2023-03-07

Changed

  • Sort detected file boundaries and remove duplicates

1.11.4 - 2023-02-20

Changed

  • Add function vrom to --function-info and tweak its input a bit

Fixed

  • Fix --data-start not processing hex correctly

1.11.3 - 2023-02-15

Added

  • Allow specifying a custom suffix to every autogenerated symbol with --custom-suffix
  • Add "referenced functions" information to the --function-info flag

1.11.2 - 2023-02-13

Added

  • Add flag to emit inline relocs
  • Add ContextSymbol.userDeclaredSize
  • Add --function-info flag

Changed

  • Do not report extra padding in functions if user declared size matches the size of the function
  • FuncRodataEntry: Fix migrate parameter if function has no rodata to be migrated

Deprecated

  • Deprecate ContextSymbol.size
    • It is kept as a property that wraps ContextSymbol.userDeclaredSize

1.11.1 - 2023-01-30

Changed

  • Allow None in FunctionRodataEntry methods
  • FuncRodataEntry: Do not write .section .text if the function is None

1.11.0 - 2023-01-30

Added

  • Install CLI tools as actual terminal programs
  • Allow invoking the CLI tools from spimdisasm as subparsers
  • Report, with a comment, which instruction made spimdisasm detect a function as handwritten function
  • New in the API: FunctionRodataEntry
    • Cleaner interface for rodata migration and similar functions
    • Provides method for intermixing functions and non-migrated rodata symbols in a way the correct order is still preserved

Deprecated

  • The old way of invoking the CLI tools (python3 -m spimdisasm.clitool) is now deprecated, but still works
  • Old functions from FileHandlers which provided rodata migration functionalities are now deprecated in favour of the new FunctionRodataEntry.

Fixed

  • disasmdis: Fix crash if the input isn't a multiple of a word

1.10.6 - 2023-01-28

Added

  • Add hardware registers as constants so they are used by lui/ori pairs
  • Check for bss symbol size to match user declared size
    • If the size doesn't match then a warning is printed to stderr
  • Warn if the globalsegment's vrom start and end is the same
  • Identify 32bitsmode elf flag

Changed

  • Avoid reporting leading zeroes as padding in rodata symbols if the size of the symbol matches the user declared one

Fixed

  • Fix some .text boundaries not being properly detected.

1.10.5 - 2023-01-28

Added

  • Emit a comment on invalid instructions disassembled as words

Removed

  • Remove redundant .noreorder

Fixed

  • Fix disasmdis ignoring endian parameter

1.10.4 - 2023-01-20

Added

  • Add EGCS compiler
  • Add iQue-specific libultra syms and hardware regs
  • Add --data-start and --data-end flags to singleFileDisasm

Changed

  • nops at the beginning of the files are now skipped.

Fixed

  • Avoid trashing function analysis for j jumps outside of the function
  • Fix disasmdis not properly accepting spaces

1.10.3 - 2023-01-08

Fixed

  • Fix OoB for automatic type-based naming

1.10.2 - 2023-01-08

Fixed

  • Fix a small typo on osAppNMIBuffer

1.10.1 - 2023-01-05

Added

  • Add a workaround for addends which does not fit on a 16 bits value

1.10.0 - 2023-01-05

Added

  • Add support for splat's symbol_addrs format for standalone invocations

Changed

  • Rework system to allow/disallow addend references on data

1.9.2 - 2023-01-02

Added

  • Add nameEnd member to ContextSymbol to allow emitting a closing user-declared label

Fixed

  • Fix emitting .align directives on unnaligned jumptables
  • Fix rodata split detection not properly considering special jumptable alignment

1.9.1 - 2022-12-29

Changed

  • Emit a .align 3 directive for every jumptable on non-IDO compilers

1.9.0 - 2022-12-28

Added

  • GlobalConfig variables can now be set via environment variables.
    • Parameters passed by cli take priority over environment variables.
    • Options configured via code (when using this as a library) take priority over environment variables.

Changed

  • Reloc system re-worked. Users can now provide their own relocs to improve the automatic disassembly

Removed

  • loPatch system has been removed and superseded by the global reloc system

1.8.2 - 2022-12-19

Added

  • Check for banned symbols on addends references

1.8.1 - 2022-12-19

Added

  • New interface for allowing banning ranges of symbols, instead of having to add them one by one

1.8.0 - 2022-12-16

Added

  • Allow to type-hint strings with asciz
  • Allow disassembling .data symbols as strings
    • This won't be automatically guessed as with .rodata, this only will happen with type-hints

Changed

Removed

  • setup.cfg was removed and all its info was moved to pyproject.toml

1.7.12 - 2022-12-05

Added

  • Output version on disassembled files
  • Add option to show which symbols reference the disassembled symbol
  • Add --file-splits option to elfObjDisasm

Changed

  • Allow symbol references on rodata (for non jump-tables)

1.7.11 - 2022-11-29

Changed

  • Check size of floats and doubles before migrating them

1.7.10 - 2022-11-26

Added

  • Allow changing the label used for jumptables labels with GlobalConfig.ASM_JTBL_LABEL
  • Allow forcing (and forcing not to) migrate a symbol on rodata migration
  • Show isAutogeneratedPad in the context file (#79)
    • Thanks @simonlindholm
  • Show the first %lo reference for each symbol in the context (#80)
    • Thanks @simonlindholm

Fixed

  • Reference NOTYPE symbols
  • Various GOT fixes

1.7.9 - 2022-11-09

Added

  • Emit a comment for automatically generated bss pads.
    • Those pads are created mainly to properly adjust the .space of a bss symbol if said symbol had an user-declared size

Fixed

  • Fix an OoB issue when trying to post-process the GOT analyzis on non-PIC mode

1.7.8 - 2022-11-04

Changed

  • Improve logic to disassemble .bytes and .shorts
  • Improve logic to find the jumptable ends (again)

Fixed

  • Fix function pointers being incorrectly tagged as %call16 instead of %got
  • Avoid crashing when trying to migrate functions when there's no rodata section
  • Fix wrong migrated rodata on PIC programs
  • Avoid using addends on function references

1.7.7 - 2022-11-02

Added

  • Allow disassembling data symbols as floats and doubles

Changed

  • Improve detection of the end of jumptables
  • Refactor REL handling. It has been simplified
    • This should improve disassembling .o files
  • Symbols from elfs are checked to be in the correct vram range before adding them to the context.

1.7.6 - 2022-10-31

Added

  • Add special handling for the GOT lazy resolver

Changed

  • Refactor GOT handling
    • Should fix IDO 5.3 disassembly
  • Use glabels for jumptable labels when the functions are not being migrated
  • Support MIPS_GOT_HI16, MIPS_GOT_LO16, MIPS_CALL_HI16 and MIPS_CALL_LO16 reloc types from .rel elf sections
  • disasmdis now ignores non hex characters
  • Negative addresses are considered as GOT accesses in PIC mode

1.7.5 - 2022-10-30

Changed

  • Use .gpword on PIC jumptables
  • Use glabel on migrated rodata again until we figure out why it messes matching
  • Do not use glabel on jumptable labels

Fixed

  • Fix showing the got table in a few niche cases

1.7.4 - 2022-10-28

1.7.4: GOT fixes

Added

  • The autodetected size of functions can now be queried from a ContextSymbol with getSize()
  • The arch level can now be specified when disassembling
    • It is detected automatically when parsing an elf file
    • .set gp=64 is disabled on MIPS1 and MIPS2 arch levels
  • elfObjDisasm will now produce a list of functions and non migrated rodata when requesting to migrate functions.
    • This can be useful to bootstrap newly generated C files so the rodata order is easier to preserve

Changed

  • elfObjDisasm now display progress to stdout when disassembling
    • This behavior can be disabled with -q
  • Rodata migration has been slightly tweaked: migration will be performed if only one function references the symbol, contrary to the old "only one reference in the whole codebase must reference the symbol"
    • Seems to be a common pattern on PIC programs compiled with IDO

Fixed

  • Fix using GOT local addresses as functions
  • Fix .data symbols incorrectly referencing GOT local addresses
  • Fix elfObjDisasm using N64 specific symbols by default
  • Migrated rodata will no longer use glabels
    • This change was made to accommodate GOT global/local references

1.7.3 - 2022-10-24

1.7.3: --aggressive-string-guesser

Added

  • New --aggressive-string-guesser flag
    • Tries to decode string even if the string is empty, the symbol may have type information or it is referenced more than once
  • Add PSYQ compiler option
    • Currently it enables the same options as SN64

Changed

  • Do not try to infer the type of a variable if the access types are heterogeneous, which may imply a struct

1.7.2 - 2022-10-24

Added

  • Allow passing context flags to elfObjDisasm

Fixed

  • Fix type inference if the user declared a type for the variable
  • Fix some strings not being properly detected on elf files (again)

1.7.1 - 2022-10-23

1.7.1: elf fixing: got and dynamic programs

Added

  • elfObjDisasm: Flags which try to mimic readelf: --file-header, --syms, --relocs and -display-got
  • elfObjDisasm: Add --split-functions. It has the same behavior as singleFileDisasm
  • elfObjDisasm: Warn when trying to disassemble an abi2 (N32) elf
  • elfObjDisasm: Warn for negative GOT accesses instead of crashing
  • elfObjDisasm: Warn if unhandled flags are found in an elf file

Fixed

  • elfObjDisasm. Fix undefined symbols handling in
  • elfObjDisasm. Fix addends of got global symbols
  • elfObjDisasm. Use rel types types from the elf file if they are available instead of trying to infer them
  • elfObjDisasm: Fix gp value detection on N32 abi
  • elfObjDisasm: $gp access are no longer symbolized if the address is not found in the got table
  • Fix rodata pointer detection in data on elf files (fixes #63)

1.7.0 - 2022-10-18

Added

  • Add leoBootID to libultra syms
  • --no-emit-cpload flag to disable emitting the .cpload directive in PIC programs
    • _gp_disp is emitted instead of the raw immediate values
    • The _gp_disp value is emitted as a comment

Changed

  • Updates rabbitizer requirement to 1.3.1
  • Tweak string disassembly
    • If a symbol is in the middle of a string then the string is aborted and disassembled as .words
    • Check the next bytes (until a word boundary) after the nul terminator of a string are zero. Thanks @Xeeynamo (#64)
    • Strings with '\a' are no longer treated as real strings
  • Avoid pairing %gp_got symbols on non PIC code
  • General cleanups

Removed

  • Remove GlobalConfig.ADD_NEW_SYMBOLS

Fixed

  • Fix --help screen. whoops
  • Fix .byte and .short in little endian (#62)
    • Thanks @Xeeynamo
  • Fix boundaries detection reporting in elfObjDisasm (#65)
    • The output of this report is csv-friendly.
    • Thanks @EllipticEllipsis
  • Fix labels not being emitted in rodata if they were not being word-aligned.
    • Fixes #59

1.6.5 - 2022-10-07

1.6.5: elf fixes

Fixed

  • Avoid crashing if a %got access' address is not in the global table. Prints a warning instead.
  • Fix symbol usage on relocatable files, kinda
  • Ignore .rel sections if the file is not of REL type
  • Avoid emitting %got rels for non PIC disassemblies

1.6.4 - 2022-10-06

1.6.4: Fix symtab parsing from relocated elfs

Fixed

  • Fix symtab parsing from relocated elfs

1.6.3 - 2022-10-04

1.6.3: Speedup for overlay disassembly

Changed

  • Moves the globalSegment check above all the other checks in getSymbol, providing a faster lookup since most of the time overlays usually reference a symbol from the globalSegment over a symbol from another overlay segment from a different category

1.6.2 - 2022-10-03

1.6.2: hotfix

Fixed

  • Fix unhashable type crash
    • Fixes #55

1.6.1 - 2022-10-03 [YANKED]

1.6.1: SN64 strikes again

Added

  • Add align directive for doubles for SN64
  • Track which functions references each symbol
    • Used to improve rodata migration on non-IDO compilers

Changed

  • Use g format specifier when formatting disassembled floats and doubles

1.6.0 - 2022-10-01

1.6.0: Refactor front-end scripts

Changed

  • The frontend scripts were converted to submodules, now those can be executed with the python3 -m spimdisasm.submodulename syntax, allowing to execute them even in the pip installations of spimdisasm.
  • Refactored raw path handling to use pathlib.
  • Add installation instructions to readme.
  • SN64 tweaks:
    • Use .align directive for string disassembly on SN64
    • Migrate const variables to functions on SN64
    • Remove .rdata check on migrated rodata for SN64

Removed

  • Deleted singleFileDisasm.py, simpleFileDisasm.py, disasmdis.py, rspDisasm.py, elfObjDisasm.py

1.5.7 - 2022-09-30

1.5.7: Fix 0 size bss variables

Fixed

  • Fixes an issue where 0 size bss variables where being outputted if the last bss variable of a file had a size which filled its size up until the file boundary

1.5.6 - 2022-09-27

1.5.6: More SN64 tweaks and data/rodata endianess

Added

  • Add option to disassemble data/rodata with different endianess than the global one
  • Allow changing the string encoding per rodata segment

Changed

  • Use .rdata on rodata migration for SN64

Fixed

  • Fixes data analyzis.
    • It was ignoring banned symbols
  • Fix ASM_DATA_SYM_AS_LABEL on bss generation
  • Fix rodata symbols searching during migration
  • Return the created segment by addOverlaySegment

1.5.5 - 2022-09-24

1.5.5: Fix ASM_DATA_SYM_AS_LABEL

Fixed

  • Fix ASM_DATA_SYM_AS_LABEL: It was outputing the data label

1.5.4 - 2022-09-24

1.5.4: More SN64 tweaks

Added

  • ASM_DATA_SYM_AS_LABEL: Allow adding a data symbol as a simple label.
  • Allow range checks on symbols referenced by data symbols
  • Add option to allow all addends referenced by data symbols

Changed

  • late_rodata logic has been tweaked to only be applied when compiler is set to IDO

Fixed

  • Fix use of user-declared sizes on functions and bss symbols

1.5.3 - 2022-09-23

1.5.3: More default banned symbols

Changed

  • Add 0x7FFFFFFF to the list of default banned symbols

1.5.2 - 2022-09-21

1.5.2: elf endianess fixes and rodata migration fixes

Changed

  • Read endianess from elf file
  • Use .section directive on migrated rodata

1.5.1 - 2022-09-19

1.5.1: symbol detection fixes

Changed

  • Check for data pointers in data itself and do a recheck in case the pointer is in the same section but behind the current symbol
  • Properly update original symbol type when creating symbols for sub-4 sizes

1.5.0 - 2022-09-17

1.5.0: dynamic elfs

Added

  • Add compatibility for dynamic elf files
    • .dynsym, .dynstr and .dynamic section parsing
    • .got table parsing
    • Use %got and %call16 syntax for $gp relative symbols.
    • .cpload REG detection

Changed

  • Minor changes on string splitting functions to improve its use as an api

1.4.2 - 2022-09-09

1.4.2: PS2 addresses hotfix

Fixed

  • Fix 0 and negative addresses being treated as real symbols

1.4.1 - 2022-09-03

1.4.1: Overlay function start bugfix

Fixed

  • Fixes a bug in which a function start was wrongly detected on an overlay because the symbol existed for said address on the global segment

1.4.0 - 2022-08-27

1.4.0: RSP and R5900 support

Added

  • Adds proper support for N64's RSP
  • Allows passing any rabbitizer.InstrCategory to SectionText to allow using any instruction set supported by rabbitizer

1.3.0 - 2022-07-08

1.3.0: rabbitizer 1.0.0

Added

  • Rodata boundaries detection

Changed

  • Updated to use rabbitizer 1.0.0

1.2.4 - 2022-07-05

Changed

  • Explicitly require a rabbitizer version smaller than the next major version to avoid possible compatibility issues.
  • Set up automatic discovery on setup.cfg

1.2.3 - 2022-06-11

1.2.3: Fix Python 3.7 compatibility (again)

Fixed

  • This time really fixes 3.7 compat, hopefully

1.2.2 - 2022-06-11

1.2.2: %hi/%lo symbol filtering fix

Fixed

  • Prevents filtering out lui/addiu combos from being real symbols

1.2.1 - 2022-06-10

1.2.1: Packaging fix

Fixed

  • Hopefully fixes a packaging problem on PyPi

1.2.0 - 2022-06-10 [YANKED]

1.2.0: Faster disassembly from rabbitizer

Changed

  • Use rabbitizer as the instruction decoder to speed up instruction analysis and disassembly
  • Other minor changes to try to be compatible with Python 3.7

1.1.7 - 2022-06-08

Changed

  • Allow changing the file offset width comment
  • SortedDict: New class which abstracts away the logic for keeping a sorted dictionary

1.1.6 - 2022-06-03

1.1.6: %hi reuse fix

Fixed

  • Fix %hi reuse with wrong values

1.1.5 - 2022-06-03

1.1.5: More overlay fixes

Changed

  • Move most of the instruction analyzing code to a new independent class
  • Try to track instructions which are likely to not be a %lo and avoid pairing it.
  • Extra checks to avoid using labels from other overlay segments
  • Only stop a look ahead search until we find either an unconditional branch or a jr instruction

1.1.4 - 2022-06-02

1.1.4: Overlay handling fixes

Changed

  • Overall adds more vrom checks for handling shared-vram overlays.
  • The autogenerated symbol size now adjusts itself considering the symbol type and the address alignment

1.1.3 - 2022-06-01

1.1.3: Minor patch

Added

  • Adds a way to register a name getter callback for symbols

1.1.2 - 2022-06-01

1.1.2: More symbol finding cleanups

Added

  • New COMPILER option in GlobalConfig, used to enable some compiler specific tweaks

Fixed

  • General cleanups and fixes related to symbol finding.

1.1.1 - 2022-05-30

1.1.1: Symbol finding fixes

Fixed

  • Multiples workarounds for pairing multiples %hi to the same %lo
  • Fix j target calculation for the look ahead symbol finder
  • Special cases for luis on delay slots
  • Track moving registers by using move, or and addu
  • Invalidate some registers after function calls
  • Check negative branches
  • Fix jump table detector for SN64

1.1.0 - 2022-05-29

1.1.0: Overlay support (hopefully)

Added

  • Add support for overlays which share VRAMs and overlays which may communicate to overlays from other categories.
    • Each new category and overlay segment must be registered in Context
  • The vrom of elements is tracked and stored. It is mainly used to autogenerate overlay's names.
  • The categorization in symbol categories (labels, functions, symbols, etc) is removed. Everything now is stored in only one big dictionary to avoid duplication and lower memory usage.

Changed

  • ElementBase#vram is now just an int as opposed to old int|None.
  • addSymbol, getSymbol and similar methods were moved to ElementBase because of the need for the respective element overlay info.
  • Symbol name generation is delayed as much as possible and autogenerated on the fly.
  • General cleanups

Removed

  • Remove the concept of "fake functions"

Fixed

  • Some minor symbol finder fixes
  • Gix symbols disappearing for no reason

1.0.6 - 2022-05-26

1.0.6: Even more SN64 fixes

Added

  • Add more checks for j as unconditional branch
  • Allow disabling %hi/%lo syntax for constants
  • Add extra global label for other symbols (usually labels) in functions when GlobalConfig.ASM_TEXT_FUNC_AS_LABEL is enabled.

1.0.5 - 2022-05-26

Added

  • Allow setting a .ent and the function name as a label
  • Float register $31 fix for NAMED_REGISTERS=False

Changed

  • Only apply the SN64 DIV fix for non handwritten functions
  • Finer control over pseudo instructions

Fixed

  • Fix CI builds (2)

1.0.4 - 2022-05-26 [YANKED]

Fixed

  • Fix the CI wheel

1.0.3 - 2022-05-26 [YANKED]

Changed

  • Add CI which builds a wheel and publishes it to PyPI

1.0.2 - 2022-05-26

Added

  • Allow changing the line ends to anything via GlobalConfig.LINE_ENDS

Fixed

  • Fix missing f on float registers when GlobalConfig.NAMED_REGISTERS was set to False

1.0.1 - 2022-05-26

Changed

  • Improve RAM usage by removing an almost unused dictionary from the Instruction classes

1.0.0 - 2022-05-26

Added

  • Version 1.0.0