[gdb/testsuite] add jit-elf-util.h and run jit function
Splits ELF related symbols into a separate jit-elf-util.h header and
enhances it with a few more.
Intention is to make adding new JIT tests possible without repeating
most of the common boilerplate.
As a test enhancement, jit-elf-main.c now calls the renamed function
after registering the jit object and ensures it returns an expected
result.
gdb/testsuite/ChangeLog:
2020-02-18 Mihails Strasuns <mihails.strasuns@intel.com>
* gdb.base/jit-elf-util.h: New header file.
* gdb.base/jit-elf-main.c: Use jit-elf-util.h, add a call to
the renamed JIT function to verify its result.