diff options
author | mengqinggang <mengqinggang@loongson.cn> | 2022-12-01 17:17:09 +0800 |
---|---|---|
committer | liuzhensong <liuzhensong@loongson.cn> | 2023-05-30 19:56:48 +0800 |
commit | 2bd766d6245bf9db77c42da3537c949ffb814bfc (patch) | |
tree | 032b6f2c21936d0e05f4cefcdc4565869ab8cf94 /ld/emultempl | |
parent | 56576f4a722b7398d35802ecf7d4185c27d6d69b (diff) | |
download | gdb-2bd766d6245bf9db77c42da3537c949ffb814bfc.zip gdb-2bd766d6245bf9db77c42da3537c949ffb814bfc.tar.gz gdb-2bd766d6245bf9db77c42da3537c949ffb814bfc.tar.bz2 |
LoongArch: ld: Add support for linker relaxation.
Add ld relax support and testsuits.
ld/ChangeLog:
* emultempl/loongarchelf.em: Regenerated.
* testsuite/ld-elf/compressed1d.d: Xfail loongarch*-*.
* testsuite/ld-elf/pr26936.d: Likewise.
* testsuite/ld-loongarch-elf/disas-jirl.d: Regenerated.
* testsuite/ld-loongarch-elf/disas-jirl-32.d: Regenerated.
* testsuite/ld-loongarch-elf/jmp_op.d: Likewise.
* testsuite/ld-loongarch-elf/macro_op.d: Likewise.
* testsuite/ld-loongarch-elf/macro_op_32.d: Likewise.
* testsuite/ld-loongarch-elf/relax-align.dd: New test.
* testsuite/ld-loongarch-elf/relax-align.s: New test.
* testsuite/ld-loongarch-elf/relax.exp: New test.
* testsuite/ld-loongarch-elf/relax.s: New test.
* testsuite/ld-loongarch-elf/uleb128.dd: New test.
* testsuite/ld-loongarch-elf/uleb128.s: New test.
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/loongarchelf.em | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ld/emultempl/loongarchelf.em b/ld/emultempl/loongarchelf.em index b790f64..4850feb 100644 --- a/ld/emultempl/loongarchelf.em +++ b/ld/emultempl/loongarchelf.em @@ -23,6 +23,7 @@ fragment <<EOF #include "ldmain.h" #include "ldctor.h" #include "elf/loongarch.h" +#include "elfxx-loongarch.h" static void larch_elf_before_allocation (void) @@ -61,6 +62,8 @@ gld${EMULATION_NAME}_after_allocation (void) } } + enum phase_enum *phase = &(expld.dataseg.phase); + bfd_elf${ELFSIZE}_loongarch_set_data_segment_info (&link_info, (int *) phase); /* gld${EMULATION_NAME}_map_segments (need_layout); */ ldelf_map_segments (need_layout); } |