Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

afl-clang-fast: modify edit_params() to handle '-r' parameters for partial linking #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jul 5, 2021

  1. afl-clang-fast: modify edit_params() to handle '-r' parameters for pa…

    …rtial linking
    
    There is a case that AFL cannot compile busybox. It is because the
    building system of busybox uses the partial linking feature of ld
    while the afl-clang-fast cannot handle such case.
    
    More specifically, the building system of busybox first merges several
    relocatable object file into a new relocatable file using the '-r'
    option, where the afl-llvm-rt.o added by afl-clang-fast is also merged,
    so the new relocatable file contains the symbols from afl-llvm-rt.o.
    At the final linking step, the new relocatable file is linked with
    afl-llvm-rt.o (added again by afl-clang-fast) into the executable file,
    but both files contain the definitions of the symbols from afl-llvm-rt.o.
    As a result, the compiler complains that and stop the building process.
    
    I fix this by restraining afl-clang-fast from adding the 'afl-llvm-rt.o'
    parameter when seeing the '-r', '-Wl,-r', or '-Wl,-i' in the cmd line.
    QinlinChen committed Jul 5, 2021
    Configuration menu
    Copy the full SHA
    5635365 View commit details
    Browse the repository at this point in the history