LoongArch: Update ELF e_flags handling according to specification.
authorliuzhensong <liuzhensong@loongson.cn>
Thu, 4 Aug 2022 06:30:39 +0000 (14:30 +0800)
committerliuzhensong <liuzhensong@loongson.cn>
Fri, 30 Sep 2022 06:00:47 +0000 (14:00 +0800)
commitc4a7e6b56218e1d5a858682186b542e2eae01a4a
treecc3a1b9f8227ed91cea78da16773225743d1ebc5
parent0d94a8735055432029237612a6eb9165db1ec9dd
LoongArch: Update ELF e_flags handling according to specification.

  Update handling of e_flags according to the documentation
  update [1] (discussions [2][3]).

  Object file bitness is now represented in the EI_CLASS byte.
  The e_flags field is now interpreted as follows:

  e_flags[2:0]: Base ABI modifier

  - 0x1: soft-float
  - 0x2: single-precision hard-float
  - 0x3: double-precision hard-float

  e_flags[7:6]: ELF object ABI version

  - 0x0: v0
  - 0x1: v1

  [1]: https://github.com/loongson/LoongArch-Documentation/blob/main/docs/LoongArch-ELF-ABI-EN.adoc#e_flags-identifies-abi-type-and-version
  [2]: https://github.com/loongson/LoongArch-Documentation/pull/61
  [3]: https://github.com/loongson/LoongArch-Documentation/pull/47
bfd/elfnn-loongarch.c
binutils/readelf.c
gas/config/tc-loongarch.c
include/elf/loongarch.h