[PATCH] ld/testsuite: add trailing newlines to pdb tests

Andreas Schwab schwab@linux-m68k.org
Sun Jul 21 14:33:37 GMT 2024


On Jul 21 2024, Alan Modra wrote:

> On Sat, Jul 20, 2024 at 10:17:00PM +0100, Mark Harmstone wrote:
>> Adds trailing newlines to the ld/testsuite/ld-pe/pdb*.d files, so they
>> can be edited in a text edito more easily, and changes pdb.exp to run
>> them and the objdump output through string trim to allow for this.
>
> I don't think objdump is omitting the trailing newline.  The problem
> is most likely this line in ld-lib.exp run_host_cmd
>     regsub "\n$" $link_output "" link_output
>
> Unless I'm much mistaken, this will remove the last newline of all
> output.  I'm not sure why this is done

Probably to mimic sh's command substitution.

-- 
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 Binutils mailing list