Hi,
Gentle ping this:
https://gcc.gnu.org/pipermail/gcc-patches/2020-September/553809.html
Thanks
Gui Haochen
On 14/9/2020 上午 11:01, HAO CHEN GUI wrote:
Hi,
Jump tables are put into text or rodata section originally. On some
platforms, it gains the performance benefit from absolute address jump
tables. So I want to let absolute address jump table be relocatable.
This patch puts absolute jump table in read only relocation section if
the target supports relocations.
/* Judge if it's a absolute jump table. Set relocatable for
absolute jump table if the target supports relocations. */
if (!CASE_VECTOR_PC_RELATIVE
&& !targetm.asm_out.generate_pic_addr_diff_vec ())
relocatable = targetm.asm_out.reloc_rw_mask ();
switch_to_section (targetm.asm_out.function_rodata_section
(current_function_decl,
relocatable));
The attachments are the patch diff file and change log file.
Bootstrapped and tested on powerpc64le-linux-gnu with no regressions.
Is this okay for trunk? Any recommendations? Thanks a lot.