Coder Social home page Coder Social logo

make fail - injector about sandsifter HOT 7 OPEN

ds2k5 avatar ds2k5 commented on June 27, 2024
make fail - injector

from sandsifter.

Comments (7)

martin3000 avatar martin3000 commented on June 27, 2024 2

Change the Makefile to:

all: injector

injector: injector.o
$(CC) $(CFLAGS) $< -O3 -Wall -no-pie -l:libcapstone.a -o $@ -pthread

%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@ -Wall

clean:
rm *.o injector

from sandsifter.

greg5678 avatar greg5678 commented on June 27, 2024

@martin3000 I edited the Makefile to state:

all: injector


injector: injector.o
$(CC) $(CFLAGS) $< -O3 -Wall -no-pie -l:libcapstone.a -o $@ -pthread


%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@ -Wall


clean:
rm *.o injector

but it gave me this error: Makefile:40: *** missing separator. Stop.

from sandsifter.

genewitch avatar genewitch commented on June 27, 2024

Literally the only thing you are adding is

-no-pie

in the injector: injector.o section. Worked for me, thanks very much, @martin3000 !

from sandsifter.

greg5678 avatar greg5678 commented on June 27, 2024

OK. I added -no-pie to the injector.o section in the make file but it said that -no-pie wasn't an command line option.

make -j8
cc  -c injector.c -o injector.o -Wall
injector.c:321:2: warning: excess elements in array initializer [enabled by default]
  .start={.bytes={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, .len=0},
  ^
injector.c:321:2: warning: (near initialization for 'total_range.start.bytes') [enabled by default]
injector.c:322:2: warning: excess elements in array initializer [enabled by default]
  .end={.bytes={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}, .len=0},
  ^
injector.c:322:2: warning: (near initialization for 'total_range.end.bytes') [enabled by default]
cc  injector.o -O3 -Wall -no-pie -l:libcapstone.a -o injector -pthread
cc: error: unrecognized command line option '-no-pie'

from sandsifter.

mynamewastaken avatar mynamewastaken commented on June 27, 2024

On Fedora 27 I installed capstone and capstone-devel and had to add -L/usr/lib64 to the Makefile to get it to compile.

from sandsifter.

pdelteil avatar pdelteil commented on June 27, 2024

Same error. Solved using the 'no-pie' flag.

from sandsifter.

Zibri avatar Zibri commented on June 27, 2024

just do: make CFLAGS=-no-pie

from sandsifter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.