Comments (1)
there is freak
if (Sym.isDefined()) {
Value += Layout.getSymbolOffset(Sym, valid);
if (!valid) {
KsError = KS_ERR_ASM_FIXUP_INVALID;
return false;
}
the value is offset -4 where the actual location
} else {
// a missing symbol. is there any resolver registered?
if (KsSymResolver) {
uint64_t imm;
ks_sym_resolver resolver = (ks_sym_resolver)KsSymResolver;
if (resolver(Sym.getName().str().c_str(), &imm)) {
// resolver handled this symbol
Value = imm;
IsResolved = true;
where we return the location of resolved symbol,
that maybe the real problem.
when Symbol is defined, the Value is a shift -4 to the actual location, and the resolver we do return a no shift actual location.
so, the PCRel needs a shift -4 value, the resolver by us can not meets it.
from keystone.
Related Issues (20)
- How to use as a cmake subdirectory
- 80386 call in 8086 mode
- Need support LongArch
- Can't install python bindings. /llvm/lib64/libkeystone.so not found
- Unmaintained? HOT 3
- support hex to asm ? HOT 1
- Keystone Not Assembling Powerpc HOT 2
- Keystone automatically converting immediates for relative instructions as if they were absolute? HOT 1
- MIPS- Branch absolute target restricted to 16 bits
- under ATT style, it treats decimal numbers as hexadecimal numbers. that is very painful.
- under intel style, Invalid operand (KS_ERR_ASM_INVALIDOPERAND) when same Label is accessed second time.
- that is a problem, there is hard coding to force Radix to 16 when calling ks_option. and there is not export api to set the radix
- Inline comments inside assembly code string | python HOT 1
- keystone can not recognize the symbol with '@' which contained by __stdcall or msvcp functions
- `leal (%eax,%eax), %edx` invalid operand. failure parsing operand ` (%eax,%eax)`, bad supporting to index addressing HOT 4
- Incorrect Assembly
- Absolute indirect jump
- Is there any support for export label offset or variables?
- not expected behavior when using sym resolver
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keystone.