libgccjit: Add support for setting the link section of global variables [PR100688]
authorAntoni Boucher <bouanto@zoho.com>
Sun, 12 Dec 2021 21:16:21 +0000 (16:16 -0500)
committerAntoni Boucher <bouanto@zoho.com>
Sun, 12 Dec 2021 21:16:23 +0000 (16:16 -0500)
commit0b52083ea2c2dd9897031fdc3802a68fd4aa45ef
tree38c90893498f6f89ee9616f5bbb567240bfc1311
parentaeedb00a1ae2ccd10b1a5f00ff466081aeadb54b
libgccjit: Add support for setting the link section of global variables [PR100688]

2021-12-12  Antoni Boucher  <bouanto@zoho.com>

gcc/jit/
PR target/100688
* docs/topics/compatibility.rst (LIBGCCJIT_ABI_18): New ABI
tag.
* docs/topics/expressions.rst: Add documentation for the
function gcc_jit_lvalue_set_link_section.
* jit-playback.h: New function (set_link_section).
* jit-recording.c: New function (set_link_section) and
support for setting the link section.
* jit-recording.h: New function (set_link_section) and new
field m_link_section.
* libgccjit.c: New function (gcc_jit_lvalue_set_link_section).
* libgccjit.h: New function (gcc_jit_lvalue_set_link_section).
* libgccjit.map (LIBGCCJIT_ABI_18): New ABI tag.

gcc/testsuite/
PR target/100688
* jit.dg/all-non-failing-tests.h: Mention new test
link-section-assembler.
* jit.dg/test-link-section-assembler.c: New test.
* jit.dg/jit.exp: New helper function to test that the
assembly contains a pattern.
gcc/jit/docs/topics/compatibility.rst
gcc/jit/docs/topics/expressions.rst
gcc/jit/jit-playback.h
gcc/jit/jit-recording.c
gcc/jit/jit-recording.h
gcc/jit/libgccjit.c
gcc/jit/libgccjit.h
gcc/jit/libgccjit.map
gcc/testsuite/jit.dg/all-non-failing-tests.h
gcc/testsuite/jit.dg/jit.exp
gcc/testsuite/jit.dg/test-link-section-assembler.c [new file with mode: 0644]