Commit Graph

1089 Commits

Author SHA1 Message Date
kyle-elliott-tob c6d9281fbf ci: Add dependabot 2025-11-20 12:12:58 -05:00
kyle-elliott-tob c829536c65 misc: Add CLAUDE.md 2025-11-20 12:12:27 -05:00
kyle-elliott-tob 18fd75b598 ci: Limit build permissions 2025-11-20 12:12:03 -05:00
William Tan 2e5b53528e Fix readme badge 2025-11-20 01:08:24 -05:00
Boris Trifkovic 67779d72a0 Fix missing includes in Arch & OS headers. 2025-11-19 17:57:30 -05:00
Duncan Ogilvie 4689097a21 Add standalone GitHub Actions v6.0.0 2025-11-05 20:46:01 -05:00
Duncan Ogilvie 9ce12a05ff Update README with new dependencies 2025-11-05 20:46:01 -05:00
Duncan Ogilvie 9a6868a27d Fix X87 lifting on LLVM 18+ 2025-11-05 20:46:01 -05:00
Duncan Ogilvie ef5aa7a9b5 Add more functionality to remill-lift to make debugging easier 2025-11-05 20:46:01 -05:00
Duncan Ogilvie 1da12ee670 Recreate Ghidra sleigh patches to remove additional Ghidra fork for PPC 2025-11-05 20:46:01 -05:00
Duncan Ogilvie 92cbd7a182 Fix compilation on Windows (clang-cl) 2025-11-05 20:46:01 -05:00
Duncan Ogilvie 1be540eeef Implement FMADD in terms of std::fma 2025-11-05 20:46:01 -05:00
Duncan Ogilvie 6082054723 Fix bug with uninitialized MONITOR variable causing UB 2025-11-05 20:46:01 -05:00
Duncan Ogilvie eba0652f86 Replace cfenv dependency with new remill FPU intrinsics 2025-11-05 20:46:01 -05:00
Duncan Ogilvie ac78aa9dca Switch to standalone sysroot for semantics compilation 2025-11-05 20:46:01 -05:00
Duncan Ogilvie 50ac24a35d Improve test failure output for lift-and-compare 2025-11-05 20:46:01 -05:00
Duncan Ogilvie 658a1806a7 No optimization flags to remill_settings and default CMAKE_BUILD_TYPE=Debug 2025-11-05 20:46:01 -05:00
Duncan Ogilvie 4bc1b54d6d Switch back to C++17 2025-11-05 20:46:01 -05:00
Duncan Ogilvie ddef25db7c Add support for LLVM 15-21 2025-11-05 20:46:01 -05:00
Matteo e42ac37294 Fix UBSan error when computing the state field offsets. 2025-11-05 20:46:01 -05:00
Duncan Ogilvie cde0863741 Remove FETCHCONTENT_BASE_DIR because it breaks multiple configurations
It is officially recommended against by CMake authors:
https://discourse.cmake.org/t/fetchcontent-base-directory-and-cmakepresets/6722/2
2025-11-05 20:46:01 -05:00
Duncan Ogilvie 37ad2b1efe Remove unused Z3 dependency 2025-11-05 20:46:01 -05:00
Duncan Ogilvie 8e40ccc60e Add standalone cxx-common alternative 2025-11-05 20:46:01 -05:00
cctv130 b6fc70f0f4 CMake: update to C++20, clean up properties, optimize fetch content (#721)
- Enable C++20 on both Windows and Linux
- Remove unnecessary set_property calls to silence LOCATION warnings
- Replace duplicate -fPIC flags with INTERFACE_POSITION_INDEPENDENT_CODE
- Set FETCHCONTENT_BASE_DIR to speed up sleigh and ghidra-fork downloads/builds
- fixed: Does not match the generator used previously: Unix Makefiles,use ninja instead
2025-09-05 17:55:23 -04:00
cctv130 e272b48e84 fix: windows clang build (#719)
* Update settings.cmake

Fix the issue where debugging on Windows in VSCode doesn’t work

* fix: windows clang build

The following flags are not supported in non-MSVC environments
/EHsc /wd4141 /wd4146 /wd4180 /wd4244 /wd4258 /wd4267 /wd4291
/wd4345 /wd4351 /wd4355 /wd4456 /wd4457 /wd4458 /wd4459 /wd4503
/wd4624 /wd4722 /wd4800 /wd4100 /wd4127 /wd4512 /wd4505 /wd4610
/wd4510 /wd4702 /wd4245 /wd4706 /wd4310 /wd4701 /wd4703 /wd4389
/wd4611 /wd4805 /wd4204 /wd4577 /wd4091 /wd4592 /wd4324

Update cmake_minimum_required(VERSION 3.21) to remove CMake warning.
2025-08-18 17:42:31 -04:00
cctv130 6185727cda Update settings.cmake (#717)
Fix the issue where debugging on Windows in VSCode doesn’t work
2025-07-23 09:47:11 -04:00
Maurice Heumann f59f129753 Pass undef if semantic function argument is unused (#716)
Remill tries to infer the proper type of an argument for a semantic function.
If the argument is unused that won't work and yields wrong results.
However, in that case, it doesn't matter what's passed,
as nobody uses the value, so passing undef works and prevents issues.
2025-07-03 20:36:28 -04:00
Masashi Yoshimura d13d43f81a Update the some artifact version of workflows/ci.yml. (#715) 2025-05-23 14:38:58 -04:00
Masashi Yoshimura aa886a2244 Fix AArch64 breakpoint exception handling to use builtin fuctions or BRK instruction. (#714) 2025-05-13 12:47:08 -04:00
Duncan Ogilvie 7f091d4256 Remove [[gnu::const]] (readnone) from __remill intrinsics (#710)
* Remove [[gnu::const]] (readnone) from __remill intrinsics

* Remove FindPureIntrinsic and SetMemoryReadNone
2024-07-17 12:32:00 -04:00
Gabriel Pizarro 1c9b5a0b26 Add rpm-build to apt readme dependencies (#706) 2024-05-11 21:50:08 -04:00
Masashi Yoshimura 92d1867d1a Fix the offset of STUR and LDUR of AArch64 instructions. (#708) 2024-05-11 21:49:42 -04:00
cctv130 269e61a601 Fixed windows build errors (#703)
* Fixed windows build errors

* fixed windows error
2024-03-10 18:09:27 -04:00
2over12 874490a894 Fix placement of 32 bit regs on e500 and populate the low bits of PC on BE (#702)
* be fixes

* decriptive names

* fix tests
2024-02-28 11:16:37 -05:00
2over12 608acf8edd Fix big endian type conversions for registers (#699)
* add conversion checking

* Update lib/BC/SleighLifter.cpp

Co-authored-by: William Tan <1284324+Ninja3047@users.noreply.github.com>

---------

Co-authored-by: William Tan <1284324+Ninja3047@users.noreply.github.com>
2024-02-14 13:43:25 -05:00
2over12 391261923a actually call branch taken store (#697) 2024-01-16 07:50:56 -05:00
Eric Kilmer cd7fc6865d Update Dockerfile base image (#695)
* Change Docker name and ignore tests on aarch64

* Remove architecture indicator from Docker image name

* Remove unused ARCH arg in Dockerfile

* Update Docker image CI job

* Update Docker info in README
2024-01-12 10:57:19 -05:00
2over12 ec76ca4c53 new layout (#696) 2024-01-12 09:18:52 -05:00
William Tan 17cff6b4df SPARC support via Sleigh (#681)
* initial WIP sleigh based SPARC32 arch

* add install option to build script

* fix register names

* fix incorrect index into current_bytes in loadFill implementation

* add didrestore register

* dlog register adding

* ignore categories

* remove decompile_mode from llvm

* fix register mapping for flags

* remove nextpc/npc since it doesn't appear to be used and breaks anvill

* overlay NPC with NEXT_PC

* remove next_pc correctly since it was still breaking stuff

* Don't mark instruction as "invalid" when we can't determine a control
flow category

* fix pcode cfg for calls and branches

* add double registers to sparc state structure

* match up with ghidra register names

* fix missing header

* add starts for blocks after control flow ops to guarentee a block split for a term

* remove sparc64_sleigh, fix initialization order

* lift floating point numbers using ghidra names

---------

Co-authored-by: Alex Cameron <asc@tetsuo.sh>
Co-authored-by: 2over12 <ian.smith@trailofbits.com>
2023-11-10 07:44:27 -05:00
2over12 0183248218 llvm 17 fixes (#688)
* llvm 17 fix

* more instances

* more fixes

* add inline

* bump ci

* bump cxx common

* add 17 case

* bump xcode version

* macos 13

* xcode 15

* bump docker to llvm 17

* change actual matrix value

* opaque pointers are the default now

* actually remove the option

* debug size

* install tree

* fix install

* fix install?

* get tree after

* build dir?

* tree above

* accumulate

* bug?

* try to remove intermediate packaging

* fix opt

* only inline

* give up on function inlining

* llvm 17

* remove debug tasks

* Update scripts/build.sh

Co-authored-by: William Tan <1284324+Ninja3047@users.noreply.github.com>

* Revert "Update scripts/build.sh"

This reverts commit 6c727a539d.

* debug

* try clear out old build

* retest

* try to save more space

* up

* Clear space and don't use cxx-common docker image (#689)

* Clear space and don't use cxx-common docker image

* Run on all PRs

* Fix perms

* Remove some unnecessary apt commands

* Install LLVM version as root

* Allow writing to external target

* Build before running tests

* Install with sudo

* Simplify with container volume mounts

---------

Co-authored-by: William Tan <1284324+Ninja3047@users.noreply.github.com>
Co-authored-by: Eric Kilmer <eric.d.kilmer@gmail.com>
2023-10-12 16:37:45 -04:00
2over12 7182636a68 fix remill lift (#687) 2023-09-26 13:17:25 -04:00
Duncan Ogilvie fe7033d608 Fix build with system LLVM (#684) 2023-08-19 17:19:25 -04:00
Duncan Ogilvie 0596de698e Clarify the documentation and fix dead links (#683) 2023-08-16 12:29:05 -04:00
2over12 a6abbb818c Mirror Sleigh's Byte-width Flags (#668)
* add sleigh state

* remove bad include

* add volatile

* dont run tests in docker deploys

* remove ccache

* Revert "remove ccache"

This reverts commit 221b70a1bc.

* Revert "dont run tests in docker deploys"

This reverts commit 72229acd6e.

* disable packaging in dockerfile

* fix block packagingA

* fix syntax
2023-07-10 12:07:42 -04:00
James Olds 047c628a84 update link to empirehacking slack (#675) 2023-07-06 10:54:47 -04:00
Eric Kilmer 396e228e93 Fix Linux AArch64 compilation for SPARC32 runtime (#674)
* Fix Linux AArch64 compilation for SPARC32 runtime

Issue with conflicting compilation target(s).

Tests fail though.
2023-05-10 18:38:18 -04:00
Eric Kilmer 22b3d4b231 Fix GCC compilation (#672)
* Fix compilation with GCC

Fixes a few errors reported by GCC and not Clang

1. "non-trivial designated initializers not supported"

    - Fixed by adding array entries that were missing initializers and
      reordering

2. "Cannot bind packed field"

    - This fixes arrays missing initializers for some entries. This
      isn't the greatest fix because instead of using a reference, we
      use a pointer, which is basically the same thing, but it is
      checked less strictly. I think a real fix would be to remove the
      'packed' annotations.

* Add GCC to CI
2023-05-09 18:45:01 -04:00
2over12 8dbd5d947d Bump Ghidra Fork Commit (#669)
* bump commit

* fix patch macro handling
2023-05-05 17:20:15 -04:00
William Tan a709d0ac58 Merge pull request #667 from lifting-bits/ian/sleigh-aarch64
Add AArch64 Sleigh Arch
2023-05-01 11:26:11 -04:00
2over12 1bbd91e420 add basic macro handling and aarch64 patches 2023-04-30 12:35:45 -04:00