https://sourceware.org/bugzilla/show_bug.cgi?id=26626
--- Comment #6 from Nick Clifton <nickc at redhat dot com> --- Created attachment 12896 --> https://sourceware.org/bugzilla/attachment.cgi?id=12896&action=edit Proposed patch Hi Serge, Here is a prototype of a patch to implement this feature. Would you mind giving it a try out please ? I made one change to the suggested protocol for the handler, adding a third argument when invoking the script. This extra argument is the name of the file that contains the reference to the missing symbol. Using the patch and a dummy handler script, I get output like this: % gcc -c hello.c % ld hello.o -e 0 --error-handling-script=./handler.sh missing symbol: hello.o:printf There is one caveat however. Due to an idiosyncrasy of the pex routines in the libiberty library, the standard output of the invoked script is lost. (Well it is redirected to a temporary file which is then deleted). So in order for the script to produce output that is visible to the user text has to be written to stderr. So for example the handler.sh script used above looks like this: #!/bin/bash echo "missing symbol: $2:$1" >/dev/stderr exit 0 I am using the pex routines for portability to non-unix like environments. Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug.