Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How libcareplus compile livepatch file #13

Open
Rtoax opened this issue Apr 22, 2024 · 0 comments
Open

How libcareplus compile livepatch file #13

Rtoax opened this issue Apr 22, 2024 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@Rtoax
Copy link
Owner

Rtoax commented Apr 22, 2024

https://github.com/rtoax/libcareplus.git

$ sudo /usr/share/bcc/tools/execsnoop 
PCOMM            PID     PPID    RET ARGS
test-gcc.sh      136818  122922    0 ./test-gcc.sh
gcc              136819  136818    0 /usr/bin/gcc -S foo.c -Wall -Werror
cc1              136820  136819    0 /usr/libexec/gcc/x86_64-redhat-linux/13/cc1 -quiet foo.c -quiet -dumpbase foo.c -dumpbase-ext .c -mtune=generic -march=x86-64 -Wall -Werror -o foo.s
gcc              136821  136818    0 /usr/bin/gcc -S bar.c -Wall -Werror
cc1              136822  136821    0 /usr/libexec/gcc/x86_64-redhat-linux/13/cc1 -quiet bar.c -quiet -dumpbase bar.c -dumpbase-ext .c -mtune=generic -march=x86-64 -Wall -Werror -o bar.s
sed              136823  136818    0 /usr/bin/sed -i s/bar.c/foo.c/ bar.s
upatch_gensrc    136824  136818    0 /usr/bin/upatch_gensrc -d9 --os=rhel6 -i foo.s -i bar.s -o foobar.s --force-global
gcc              136825  136818    0 /usr/bin/gcc -o foo foo.s -Wall -Werror
as               136826  136825    0 /usr/bin/as --64 -o /tmp/ccpTPil6.o foo.s
collect2         136827  136825    0 /usr/libexec/gcc/x86_64-redhat-linux/13/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/13/lto-wrapper -plugin-opt=-fresolution=/tmp/ccRlNBXi.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o foo 
ld               136828  136827    0 /usr/bin/ld -plugin /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/13/lto-wrapper -plugin-opt=-fresolution=/tmp/ccRlNBXi.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o foo 
gcc              136829  136818    0 /usr/bin/gcc -o foobar foobar.s -Wall -Werror -Wl,-q
as               136830  136829    0 /usr/bin/as --64 -o /tmp/ccoAhjNF.o foobar.s
collect2         136831  136829    0 /usr/libexec/gcc/x86_64-redhat-linux/13/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/13/lto-wrapper -plugin-opt=-fresolution=/tmp/ccTCsQCh.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o foobar 
ld               136832  136831    0 /usr/bin/ld -plugin /usr/libexec/gcc/x86_64-redhat-linux/13/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/13/lto-wrapper -plugin-opt=-fresolution=/tmp/ccTCsQCh.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o foobar 
upatch_strip     136833  136818    0 /usr/bin/upatch_strip --strip foobar foobar.stripped
upatch_strip     136834  136818    0 /usr/bin/upatch_strip --rel-fixup foo foobar.stripped
strip            136835  136818    0 /usr/bin/strip --strip-unneeded foobar.stripped
upatch_strip     136836  136818    0 /usr/bin/upatch_strip --undo-link foo foobar.stripped
readelf          136838  136837    0 /usr/bin/readelf -n foo
grep             136839  136837    0 /usr/bin/grep Build ID
upatch_make      136840  136818    0 /usr/bin/upatch_make -b 520c761f0771885a1092275a049c3bc22b43dc52 foobar.stripped -o foo.upatch -i 1

@Rtoax Rtoax self-assigned this Apr 22, 2024
@Rtoax Rtoax added the documentation Improvements or additions to documentation label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant