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

Fix RPATH regex for Ubuntu #87

Merged
merged 3 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/qemu_libafl_bridge/Cargo.lock
/qemu_libafl_bridge/target/
/GNUmakefile
/build/
/.cache/
Expand All @@ -22,3 +20,8 @@ GTAGS
*.swp
*.patch
*.gcov

# --- Begin LibAFL code ---
/.idea
/compile_commands.json
# --- End LibAFL code ---
5 changes: 4 additions & 1 deletion linker_interceptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
is_linking_qemu = False

shared_library_pattern = r"^[^-].*/lib(.*)\.so(\.[0-9].*)?(?!rsp)$"
rpath_pattern = r"^'.*,-rpath,(.*)'$"
rpath_pattern = r".*,-rpath,(.*)'?.*"
rpath_link_pattern = r"^.*,-rpath-link,(.*)$"

linker_interceptor_pattern = r"(\": \")(.*linker_interceptor.py)( )"
Expand All @@ -40,6 +40,9 @@ def fix_compile_commands():
with open("compile_commands.json", 'w') as f:
f.write(res)

if not os.path.isfile("../compile_commands.json"):
os.symlink("build/compile_commands.json", "../compile_commands.json")

def process_args(args):
global out_args, shareds, search, is_linking_qemu
prev_o = False
Expand Down
Loading