There is a solution but it seems that it works only once - the first run (adding to a shortcut LD_PRELOAD=$HOME/linusmemcpy.so /usr/bin/firefox &) . Then an error occurs:
Failed to execute child process "LD_PRELOAD=$HOME/linusmemcpy.so" (No such file or directory)
linusmemcpy.so exists in the location but it does not work.
It was by the advice:
- Cut and paste this into a prompt:
---Cut below---
cat > $HOME/Downloads/linusmemcpy.c <<EOF
#include <sys/types.h>
void *memcpy(void *dst, const void *src, size_t size)
{
void *orig = dst;
asm volatile("rep ; movsq"
:"=D" (dst), "=S" (src)
:"0" (dst), "1" (src), "c" (size >> 3)
:"memory");
asm volatile("rep ; movsb"
:"=D" (dst), "=S" (src)
:"0" (dst), "1" (src), "c" (size & 7)
:"memory");
return orig;
}
EOF
cd $HOME/Downloads
gcc -O2 -c linusmemcpy.c
ld -G linusmemcpy.o -o linusmemcpy.so
---Stop cutting here---
-
Shutdown any running copies of your webbrowser.
-
Until a Adobe has fixed their Flash player, start your webbrowser as below:
For Firefox users:
LD_PRELOAD=$HOME/Downloads/linusmemcpy.so /usr/bin/firefox &
For Google Chrome users:
LD_PRELOAD=$HOME/Downloads/linusmemcpy.so /opt/google/chrome/google-chrome &
[mod]Please use [CODE]
tags when posting command lines, source, ...