Regarding run_link_test (was: Re: patch, ld ELF segfault, gasi370-elf, d10v)
Hans-Peter Nilsson
hp@bitrange.com
Mon Jun 10 13:47:00 GMT 2002
On Mon, 10 Jun 2002 trix@redhat.com wrote:
> Hans-Peter Nilsson wrote:
>
> > Why do you add run_link_test? It's just run_dump_test with no
> > output, right? If there's some tweak needed, I don't think we
> > want a copy-pasted function with the same basic functionality.
> >
>
> This a design issue.
Not IMO. This is duplicating code.
> Add a similar test proc or
Mostly *the same* test procedure, with some functionality
stripped off. So when someone wants a new option, there are now
two places to add it (or three if you count run_dump_test in gas
too; they should merge to some common dir).
> Add another parameter to run_dump_test to circumvent the purpose
> run_dump_test.
No, no parameter needed, and the purpose is not to test a dump.
:-) The purpose is to test that linking went fine, usually by a
succesful linker exit, absence of error/warning output and then
with some inspection tool. Alternatively, that the linker emits
a particular error. So by extension, if you just want to test
that the linker does *not* emit an error (that is, you don't
want to inspect the linked object), why not add a "just-link:"
or "noerror:" or "nothing-here-to-see--move-along:" option?
Though usually, there's *something* about the linked object you
want to inspect, just for sanity's sake. That's why I've never
found a pressing need for this no-inspection-needed
functionality.
brgds, H-P
More information about the Binutils
mailing list