public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] LoongArch: Add support for the third expression of .align for R_LARCH_ALIGN
@ 2023-12-22  2:28 mengqinggang
  2023-12-22  2:28 ` [PATCH v2 1/1] " mengqinggang
  0 siblings, 1 reply; 2+ messages in thread
From: mengqinggang @ 2023-12-22  2:28 UTC (permalink / raw)
  To: binutils
  Cc: xuchenghua, chenglulu, liuzhensong, cailulu, xry111, i.swmail,
	maskray, luweining, wanglei, hejinyang, mengqinggang

If the symbol index is not zero, the addend is used to represent
the first and the third expressions of the .align.

The lowest 8 bits are used to represent the first expression.
Other bits are used to represent the third expression.

The addend of R_LARCH_ALIGN for ".align 5, ,4" is 0x405.
The addend of R_LARCH_ALIGN for ".balign 32, ,4" is 0x405.

Changes from v1:
  Set the address of symbol in R_LARCH_ALIGN to zero.

mengqinggang (1):
  LoongArch: Add support for the third expression of .align for
    R_LARCH_ALIGN

 bfd/elfnn-loongarch.c                         | 71 ++++++++++++-------
 bfd/elfxx-loongarch.c                         | 10 ++-
 gas/config/tc-loongarch.c                     | 20 ++++--
 gas/config/tc-loongarch.h                     |  4 +-
 gas/testsuite/gas/loongarch/relax_align.d     | 46 +++++++-----
 gas/testsuite/gas/loongarch/relax_align.s     |  4 +-
 ld/testsuite/ld-elf/anno-sym.d                |  2 +
 ld/testsuite/ld-loongarch-elf/anno-sym.d      |  7 ++
 ld/testsuite/ld-loongarch-elf/anno-sym.l      |  4 ++
 ld/testsuite/ld-loongarch-elf/anno-sym.s      | 13 ++++
 .../ld-loongarch-elf/ld-loongarch-elf.exp     |  1 +
 ld/testsuite/ld-loongarch-elf/relax-align.dd  |  5 +-
 ld/testsuite/ld-loongarch-elf/relax-align.s   |  5 +-
 ld/testsuite/ld-loongarch-elf/relax.exp       |  2 +-
 14 files changed, 134 insertions(+), 60 deletions(-)
 create mode 100644 ld/testsuite/ld-loongarch-elf/anno-sym.d
 create mode 100644 ld/testsuite/ld-loongarch-elf/anno-sym.l
 create mode 100644 ld/testsuite/ld-loongarch-elf/anno-sym.s

-- 
2.36.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-22  2:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-22  2:28 [PATCH v2 0/1] LoongArch: Add support for the third expression of .align for R_LARCH_ALIGN mengqinggang
2023-12-22  2:28 ` [PATCH v2 1/1] " mengqinggang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).