public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Fix some bugs of relaxation
@ 2023-11-16 11:19 mengqinggang
  2023-11-16 11:19 ` [PATCH v2 1/6] LoongArch: Fix ld --no-relax bug mengqinggang
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: mengqinggang @ 2023-11-16 11:19 UTC (permalink / raw)
  To: binutils
  Cc: xuchenghua, chenglulu, liuzhensong, xry111, i.swmail, maskray,
	mengqinggang

These patches mainly fix the shared objects can't be relaxed bug.
The "elf_seg_map (info->output_bfd) == NULL" condition prevent the
shared object to be relaxed. Ld can perform up to 10 relaxation tries.
In first try, both execute file and shared object do not meet this condition.
But the execute file can trigger a second try because of the program header
size change due to the number of segement change (execute file add 
extra INTERP segemnt).

Changelog:

v1 -> v2:
  1. Delete useless .fill 0x4000.
  2. Change Fixme to FIXME.
  3. Modify some comments.

mengqinggang (6):
  LoongArch: Fix ld --no-relax bug
  LoongArch: Directly delete relaxed instuctions in first relaxation
    pass
  LoongArch: Multiple relax_trip in one relax_pass
  LoongArch: Remove "elf_seg_map (info->output_bfd) == NULL" relaxation
    condition
  LoongArch: Modify link_info.relax_pass from 3 to 2
  LoongArch: Add more relaxation testcases

 bfd/elfnn-loongarch.c                         | 54 ++++++++-----
 ld/emultempl/loongarchelf.em                  | 20 ++++-
 .../ld-loongarch-elf/relax-segment-max.s      | 12 +++
 .../ld-loongarch-elf/relax-segment-min.s      | 12 +++
 ld/testsuite/ld-loongarch-elf/relax-so.s      |  4 +
 ld/testsuite/ld-loongarch-elf/relax.exp       | 80 +++++++++++++++++--
 6 files changed, 157 insertions(+), 25 deletions(-)
 create mode 100644 ld/testsuite/ld-loongarch-elf/relax-segment-max.s
 create mode 100644 ld/testsuite/ld-loongarch-elf/relax-segment-min.s
 create mode 100644 ld/testsuite/ld-loongarch-elf/relax-so.s

-- 
2.36.0


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

end of thread, other threads:[~2023-11-16 11:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-16 11:19 [PATCH v2 0/6] Fix some bugs of relaxation mengqinggang
2023-11-16 11:19 ` [PATCH v2 1/6] LoongArch: Fix ld --no-relax bug mengqinggang
2023-11-16 11:19 ` [PATCH v2 2/6] LoongArch: Directly delete relaxed instuctions in first relaxation pass mengqinggang
2023-11-16 11:19 ` [PATCH v2 3/6] LoongArch: Multiple relax_trip in one relax_pass mengqinggang
2023-11-16 11:19 ` [PATCH v2 4/6] LoongArch: Remove "elf_seg_map (info->output_bfd) == NULL" relaxation condition mengqinggang
2023-11-16 11:19 ` [PATCH v2 5/6] LoongArch: Modify link_info.relax_pass from 3 to 2 mengqinggang
2023-11-16 11:19 ` [PATCH v2 6/6] LoongArch: Add more relaxation testcases 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).