paboldin / meltdown-exploit

Meltdown Exploit PoC
939 stars 269 forks source link

Doesn't build on gcc 4.4.7 #25

Open izobara opened 6 years ago

izobara commented 6 years ago

cc   meltdown.o   -o meltdown
meltdown.o: In function `check':
meltdown.c:(.text+0x803): undefined reference to `__rdtscp'
meltdown.c:(.text+0x81f): undefined reference to `__rdtscp'
meltdown.o: In function `main':
meltdown.c:(.text+0x9da): undefined reference to `__rdtscp'
meltdown.c:(.text+0x9f2): undefined reference to `__rdtscp'
meltdown.c:(.text+0xa1a): undefined reference to `__rdtscp'
meltdown.o:meltdown.c:(.text+0xa35): more undefined references to `__rdtscp' follow
collect2: ld returned 1 exit status
make: *** [meltdown] Error 1

g++ --version
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.```
ykanello commented 6 years ago

Same here: cc -O2 -msse2 -c -o meltdown.o meltdown.c cc meltdown.o -o meltdown meltdown.o: In function check': meltdown.c:(.text+0x803): undefined reference tordtscp' meltdown.c:(.text+0x81f): undefined reference to `rdtscp' meltdown.o: In function main': meltdown.c:(.text+0x9da): undefined reference tordtscp' meltdown.c:(.text+0x9f2): undefined reference to `rdtscp' meltdown.c:(.text+0xa1a): undefined reference to __rdtscp' meltdown.o:meltdown.c:(.text+0xa35): more undefined references to__rdtscp' follow collect2: ld returned 1 exit status make: *** [meltdown] Error 1

g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)

pm-cz commented 6 years ago

I wonder, did you try the build without RDTSCP? Does it fail as well?

make CFLAGS=-DHAVE_RDTSCP=0 clean all
miliauskaite commented 6 years ago

Yes it still fails

gillarda commented 6 years ago

Was not working either. I ended up installing a newer version of gcc via devtoolset.

paboldin commented 6 years ago

Sorry guys, I'm traveling and don't have access to the lab, so can't test & patch.