LoongArch: binutils: Add support for linker relaxation.
authormengqinggang <mengqinggang@loongson.cn>
Thu, 1 Dec 2022 08:06:42 +0000 (16:06 +0800)
committerliuzhensong <liuzhensong@loongson.cn>
Tue, 30 May 2023 11:56:45 +0000 (19:56 +0800)
commit762444623565211ab2b6ea1fd1a19f8dd7f98888
tree2f44798943a8f7a1eba1d6301596eae1d12703a9
parent7ad9de1188609dee11a5c196869fca62da8154a3
LoongArch: binutils: Add support for linker relaxation.

Add support for relocs related to relax to readelf.

binutils/ChangeLog:

* readelf.c (target_specific_reloc_handling): Handle ULEB128 reloc.
(is_32bit_inplace_add_reloc): Handle new reloc.
(is_32bit_inplace_sub_reloc): Likewise.
(is_64bit_inplace_add_reloc): Likewise.
(is_64bit_inplace_sub_reloc): Likewise.
(is_16bit_inplace_add_reloc): Likewise.
(is_16bit_inplace_sub_reloc): Likewise.
(is_8bit_inplace_add_reloc): Likewise.
(is_8bit_inplace_sub_reloc): Likewise.
(is_6bit_inplace_sub_reloc): Likewise.
(is_6bit_inplace_add_reloc): New function.
(apply_relocations): Handle new reloc.
* testsuite/binutils-all/readelf.exp: Add -mno-relax option
for LoongArch.
binutils/readelf.c
binutils/testsuite/binutils-all/readelf.exp