Comments (10)
Ok, I found them, they're in movfuscator/lcc/etc/lcc.c
for anyone else looking for them.
from movfuscator.
This is because of __restrict
not being accepted by lcc
. Defining it to empty fixes the issue.
from movfuscator.
This is because of
__restrict
not being accepted bylcc
. Defining it to empty fixes the issue.
Could you please introduce the steps more detail? I don't know how to operate. Thanks!
from movfuscator.
diff --git a/etc/linux.c b/etc/linux.c
index 5df6059..e9e4a82 100755
--- a/etc/linux.c
+++ b/etc/linux.c
@@ -12,23 +12,23 @@ char *suffixes[] = { ".c", ".i", ".s", ".o", ".out", 0 };
char inputs[256] = "";
char *cpp[] = { LCCDIR "gcc/cpp",
"-U__GNUC__", "-D_POSIX_SOURCE", "-D__STDC__=1", "-D__STRICT_ANSI__",
- "-Dunix", "-Di386", "-Dlinux",
+ "-Dunix", "-Di386", "-Dlinux", "-D__restrict=", "-std=c89", "-Drestrict=",
"-D__unix__", "-D__i386__", "-D__linux__", "-D__signed__=signed",
"$1", "$2", "$3", 0 };
char *include[] = {"-I" LCCDIR "include", "-I" LCCDIR "gcc/include", "-I/usr/include", 0 };
You have to modify the build.sh to keep it from resetting lcc.
diff --git a/build.sh b/build.sh
index a5daed1..a38669c 100755
--- a/build.sh
+++ b/build.sh
@@ -3,8 +3,8 @@
set -v
# grab the frontend
[ ! -d "lcc" ] && git clone https://github.com/drh/lcc
-cd lcc && git reset --hard 3b3f01b4103cd7b519ae84bd1122c9b03233e687 && cd -
+# cd lcc && git reset --hard 3b3f01b4103cd7b519ae84bd1122c9b03233e687 && cd -
# create a build directory
export BUILDDIR=`pwd`/build
from movfuscator.
I've tried to operate as you said, but the problem still exists. However, when I use movcc
to compile my source file by manually adding parameter -D__restrict=
and -Drestrict=
, it can works.
from movfuscator.
diff --git a/etc/lcc.c b/etc/lcc.c
index 95b621a..04a80c3 100755
--- a/etc/lcc.c
+++ b/etc/lcc.c
@@ -100,6 +100,8 @@ main(int argc, char *argv[]) {
exit(0);
}
plist = append("-D__LCC__", 0);
+ plist = append("-D__restrict=", 0);
+ plist = append("-Drestrict=", 0);
initinputs();
if (getenv("LCCDIR"))
option(stringf("-lccdir=%s", getenv("LCCDIR")));
from movfuscator.
OK, it works! Thank you very much!
from movfuscator.
Having this error still. After issue #19 was resolved, if I follow the steps here to fix this error, any binary built with movcc segfaults. Before #19 was fixed, I could follow the steps here and get a working compiler, but I just couldn't use --no-mov-flow. Now, even when not using --no-mov-flow, I'm just getting segfaults with anything I try and compile.
from movfuscator.
I've tried to fix this, but I can't find the files for the DIFF you're referencing.
from movfuscator.
@ThePlasmaRailgun They are in the lcc/ subfolder, except for build.sh which is in the top folder.
from movfuscator.
Related Issues (20)
- maybe it is taking too long ... ?
- doom.patch not found
- Cannot run movcc compiled files HOT 3
- Fails to build softfloat.c on OS/X HOT 1
- make: *** [Makefile:21: timesoftfloat.o] Error 1 HOT 3
- Enhancement: Leave some instructions as-is
- "Mov is Turing complete" link broken in readme HOT 2
- LLC not able to compile C++ code into C HOT 1
- Binary representation of constants is unsupported: 0b10101 HOT 1
- Compiling with movcc fails HOT 4
- make: *** [Makefile:24: timesoftfloat] Error 1
- ld error HOT 1
- Bad variable name on ubuntu sub system for windows 10
- Failed build and install when current working directory path contains spaces.
- Not able to compile using movcc HOT 1
- movfuscator/build/rcc: unknown target `x86/mov'; must specify one of
- relocation in read-only section .text'
- invalid URL HOT 1
- I want to build a corresponding movfuscator on the ARM architecture. How should I pay attention to it or how to carry out this project HOT 1
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 movfuscator.