[PATCH v4] elf: Fix DFS sorting algorithm for LD_TRACE_LOADED_OBJECTS with missing libraries (BZ #28868)

Andreas Schwab schwab@linux-m68k.org
Fri Mar 4 15:24:16 GMT 2022


On Mär 04 2022, Adhemerval Zanella wrote:

>>> +  test -f $(objpfx)libtracemod$(1).so \
>>> +	  && mv $(objpfx)libtracemod$(1).so $(objpfx)libtracemod$(1)
>> 
>> This will result in a non-zero status if $(objpfx)libtracemod$(1).so
>> doesn't exist, causing the command to fail.  It's also not race-free.
>
> Right, but since $(objpfx)libtracemod$(1).so is a prerequisite I don't
> see how the failure will happen.  How do you suggest to handle it?

If $(objpfx)libtracemod$(1).so is guaranteed to exist, then you don't
need the test.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


More information about the Libc-alpha mailing list