Simon, Thanks for reviewing. I was trying to confine the fix to the test case for better readability. Modified as you suggested and fixed other test cases as well (couldn’t verify the arm test case due to machine unavailability) Failing make check command: make check RUNTESTFLAGS="--all -v -v -v GDB='${GDB_INSTALL_DIR}/bin/gdb' CFLAGS_FOR_TARGET='-w -gdwarf-4' CXXFLAGS_FOR_TARGET='-w -gdwarf-4' CPPFLAGS_FOR_TARGET='-w -gdwarf-4' CC_FOR_TARGET='clang' CXX_FOR_TARGET='clang++'" TESTS="gdb.base/jit-elf.exp" LLD Error: ld.lld: error: -Ttext-segment is not supported. Use --image-base if you intend to set the base address thanks, vigneshbalu. -----Original Message----- From: Simon Marchi Sent: Monday, March 21, 2022 7:15 PM To: Balasubrmanian, Vignesh ; gdb-patches@sourceware.org Cc: George, Jini Susan ; Kumar N, Bhuvanendra Subject: Re: [PATCH 1/2] Add lld(linker) specific option. [CAUTION: External Email] On 2022-03-21 08:15, Balasubrmanian, Vignesh via Gdb-patches wrote: > > Please review the attached patch. > > LLD doesn't have the option "-Ttext-segment" but "--image-base". > So first try using "-Ttext-segment". If it fails, try the lld option "--image-base" before failing. > > Thanks, > vigneshbalu > > Hi, The approach looks ok to me. Grepping for "text-segment", I see three other tests using -Ttext-segment, are we going to need to fix those up too? - gdb.base/execl-update-breakpoints.exp - gdb.arch/arm-bl-branch-dest.exp - gdb.threads/step-over-exec.exp If so, it would be interesting to make this an option to gdb_compile, instead of specifying a linker-specific flag. For example, you'd use: set options [list \ additional_flags=-DFUNCTION_NAME=[format "jit_function_%04d" $i] \ text_segment=$addr] and text_segment would be recognized by gdb_compile and the complexity would be hidden there. Can you mention (here and in the commit message) the full "make check" line you use to test this? Simon