gold testsuite: line numbers in debug_msg test
Marcin Kościelnicki
koriakin@0x04.net
Wed Sep 23 20:06:00 GMT 2015
I'm having problems with the gold debug_msg test on s390, specifically
with the line numbers printed. debug_msg.sh already allows some leeway
for them, but it seems the code emitted for s390 is more unusual than it
expects.
The first problem is with undefined symbol references in testfn. The
testsuite assumes the relocation for the undefined symbol will be inside
an instruction described by .debug_line to be on the exact line of the
undefined reference. However, this doesn't work for s390, which uses
literal pools - the addresses (which are relocated) are stored after the
function code, and .debug_line considers them to belong to the closing
brace of the function.
The second problem is with SometimesInlineFunction in odr_violation2.cc
- while the test checks for first instruction belonging to either the
opening brace or the return statement, gcc on RHEL does one better by
marking the first instruction (which is a multiply instruction) as
belonging to line 29 (the closing brace).
I'm attaching a patch to make the testsuite more open-minded about the
correct line numbers. Does that look OK?
Marcin KoÅcielnicki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gold-testsuite-Make-debug_msg.sh-more-open-minded-ab.patch
Type: text/x-patch
Size: 6144 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150923/080265ed/attachment.bin>
More information about the Binutils
mailing list