Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM support #21

Open
TcM1911 opened this issue Mar 15, 2021 · 2 comments
Open

ARM support #21

TcM1911 opened this issue Mar 15, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@TcM1911
Copy link
Member

TcM1911 commented Mar 15, 2021

Support for processing ARM binaries.

@TcM1911 TcM1911 added this to the v0.9.0 milestone Mar 15, 2021
@TcM1911 TcM1911 added the enhancement New feature or request label Mar 15, 2021
@TcM1911 TcM1911 removed this from the v0.9.0 milestone Jul 2, 2021
@0xdevalias
Copy link

0xdevalias commented Nov 28, 2023

I believe the below is related to this issue (adding here particularly for context of error messages/etc since this issue didn't show up when I searched originally):


$ /opt/homebrew/Cellar/redress/1.1.1/bin/redress info /opt/homebrew/Cellar/redress/1.1.1/bin/redress
panic: Unsupported architecture

goroutine 1 [running]:
github.com/goretk/gore.(*machoFile).getFileInfo(0x1400002c4a0)
	github.com/goretk/[email protected]/macho.go:117 +0xdc
github.com/goretk/gore.Open({0x16f1e6a84, 0x2e})
	github.com/goretk/[email protected]/file.go:86 +0x348
main.listInfo({0x16f1e6a84?, 0x0?})
	github.com/goretk/redress/info.go:50 +0x90
main.init.1.func1(0x140000e6e00?, {0x1400002c300?, 0x4?, 0x100e4f6df?})
	github.com/goretk/redress/info.go:25 +0x30
github.com/spf13/cobra.(*Command).execute(0x140000c4280, {0x1400002c2e0, 0x1, 0x1})
	github.com/spf13/[email protected]/command.go:860 +0x53c
github.com/spf13/cobra.(*Command).ExecuteC(0x1010dd2c0)
	github.com/spf13/[email protected]/command.go:974 +0x318
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:902
main.main()
	github.com/goretk/redress/main.go:25 +0x24

is this only for x86?

Originally posted by @chenrui333 in Homebrew/homebrew-core#155724 (comment)


That seems to be coming from the gore lib that redress depends on:

gore/macho.go

Lines 104 to 123 in 7856820

func (m *machoFile) getFileInfo() *FileInfo {
fi := &FileInfo{
ByteOrder: m.file.ByteOrder,
OS: "macOS",
}
switch m.file.Cpu {
case macho.Cpu386:
fi.WordSize = intSize32
fi.Arch = Arch386
case macho.CpuAmd64:
fi.WordSize = intSize64
fi.Arch = ArchAMD64
case macho.CpuArm64:
fi.WordSize = intSize64
fi.Arch = ArchARM64
default:
panic("Unsupported architecture")
}
return fi
}


What system were you trying to run it on?

Originally posted by @0xdevalias in Homebrew/homebrew-core#155724 (comment)


I am trying on ventura arm, if does not run for arm, then we probably need depends_on arch: :x86_64 as well as some upstream note on it

Originally posted by @chenrui333 in Homebrew/homebrew-core#155724 (comment)

@0xdevalias
Copy link

0xdevalias commented Dec 5, 2023

@TcM1911 I believe this may have been fixed by @derekparker in:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants