]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] use -Ttext-segment for jit-elf tests
authorMihails Strasuns <mihails.strasuns@intel.com>
Mon, 17 Feb 2020 10:36:47 +0000 (11:36 +0100)
committerMihails Strasuns <mihails.strasuns@intel.com>
Tue, 12 May 2020 07:52:46 +0000 (09:52 +0200)
commit80ad340c90234f7294ee71468c984e7f853d9bb6
treea3c2677b51aa3c0eaa7eddc6e082e7f65e3833da
parentf80120719777e671e871434d727716355d6ab57d
[gdb/testsuite] use -Ttext-segment for jit-elf tests

Removes the need to manually relocate loaded ELF binary by using a fixed
constant as both mmap base address and as a requested first segment
address supplied to the linker.

In future will enable JIT tests with a valid DWARF debug info.  Current
tests still need to compile without a debug info though, because they do
a function name modification.

gdb/testsuite/ChangeLog:

2020-02-18  Mihails Strasuns  <mihails.strasuns@intel.com>

* lib/jit-elf-helpers.exp: Supply -Ttext-segment linker flag and
  define LOAD_ADDRESS/LOAD_INCREMENT macros for the compiled binaries.
* gdb.base/jit-elf-main.c: Use LOAD_ADDRESS/LOAD_INCREMENT to
  calculate the mmap address.
gdb/testsuite/gdb.base/jit-elf-main.c
gdb/testsuite/lib/jit-elf-helpers.exp