aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-loongarch.c
diff options
context:
space:
mode:
authorliuzhensong <liuzhensong@loongson.cn>2022-07-20 19:55:27 +0800
committerliuzhensong <liuzhensong@loongson.cn>2022-07-25 09:59:08 +0800
commit9801120721c3a702ce3bd50433ef920f92a83502 (patch)
treea4636cc25aac46f15fc1e7d7d62ce9573057b956 /bfd/elfxx-loongarch.c
parentbc2a35c0b48a93db21af2e7c429dc83828c672c8 (diff)
downloadgdb-9801120721c3a702ce3bd50433ef920f92a83502.zip
gdb-9801120721c3a702ce3bd50433ef920f92a83502.tar.gz
gdb-9801120721c3a702ce3bd50433ef920f92a83502.tar.bz2
bfd: Delete R_LARCH_NONE from dyn info of LoongArch.
Some R_LARCH_64 in section .eh_frame will to generate R_LARCH_NONE, we change relocation to R_LARCH_32_PCREL from R_LARCH_64 in setction .eh_frame and not generate dynamic relocation for R_LARCH_32_PCREL. Add New relocate type R_LARCH_32_PCREL for .eh_frame. include/elf/ loongarch.h bfd/ bfd/bfd-in2.h libbfd.h reloc.c elfxx-loongarch.c elfnn-loongarch.c gas/config/ tc-loongarch.c binutils/ readelf.c ld/testsuite/ld-elf/ eh5.d
Diffstat (limited to 'bfd/elfxx-loongarch.c')
-rw-r--r--bfd/elfxx-loongarch.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/bfd/elfxx-loongarch.c b/bfd/elfxx-loongarch.c
index f059f1a..0b00df5 100644
--- a/bfd/elfxx-loongarch.c
+++ b/bfd/elfxx-loongarch.c
@@ -1327,7 +1327,24 @@ static loongarch_reloc_howto_type loongarch_howto_table[] =
reloc_bits, /* adjust_reloc_bits */
"gd_hi20"), /* larch_reloc_type_name */
- LOONGARCH_HOWTO (R_LARCH_RELAX, /* type (99). */
+ LOONGARCH_HOWTO (R_LARCH_32_PCREL, /* type (99). */
+ 0, /* rightshift. */
+ 4, /* size. */
+ 32, /* bitsize. */
+ true, /* pc_relative. */
+ 0, /* bitpos. */
+ complain_overflow_dont, /* complain_on_overflow. */
+ bfd_elf_generic_reloc, /* special_function. */
+ "R_LARCH_32_PCREL", /* name. */
+ false, /* partial_inplace. */
+ 0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false, /* pcrel_offset */
+ BFD_RELOC_LARCH_32_PCREL, /* bfd_reloc_code_real_type */
+ NULL, /* adjust_reloc_bits */
+ NULL), /* larch_reloc_type_name */
+
+ LOONGARCH_HOWTO (R_LARCH_RELAX, /* type (100). */
0, /* rightshift */
1, /* size */
0, /* bitsize */