public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v1 0/6] Fix some bugs of relaxation
@ 2023-11-16  6:23 mengqinggang
  2023-11-16  6:23 ` [PATCH v1 1/6] LoongArch: Fix ld --no-relax bug mengqinggang
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: mengqinggang @ 2023-11-16  6:23 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).

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                         | 53 +++++++-----
 ld/emultempl/loongarchelf.em                  | 20 ++++-
 .../ld-loongarch-elf/relax-segment-max.s      | 13 +++
 .../ld-loongarch-elf/relax-segment-min.s      | 13 +++
 ld/testsuite/ld-loongarch-elf/relax-so.s      |  4 +
 ld/testsuite/ld-loongarch-elf/relax.exp       | 80 +++++++++++++++++--
 6 files changed, 158 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] 11+ messages in thread

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

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

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).