public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] s390x: Align __bss_end to a halfword boundary
@ 2023-06-23  9:39 Thomas Huth
  2023-06-26 15:34 ` Claudio Imbrenda
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Huth @ 2023-06-23  9:39 UTC (permalink / raw)
  To: Janosch Frank, Claudio Imbrenda, Nico Böhr
  Cc: David Hildenbrand, linux-s390, kvm

We are using the "larl" instruction to load the address of __bss_end,
and this instruction can only deal with even addresses, so we have
to make sure that this symbol is aligned accordingly. Otherwise this
will cause a failure with the new binutils 2.40 and Clang:

 /usr/bin/ld: s390x/cstart64.o(.init+0x6a): misaligned symbol `__bss_end'
              (0x2c0d1) for relocation R_390_PC32DBL

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 s390x/flat.lds.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/s390x/flat.lds.S b/s390x/flat.lds.S
index 0cb7e383..5e91ecac 100644
--- a/s390x/flat.lds.S
+++ b/s390x/flat.lds.S
@@ -37,6 +37,7 @@ SECTIONS
 	. = ALIGN(16);
 	__bss_start = .;
 	.bss : { *(.bss) }
+	. = ALIGN(2);
 	__bss_end = .;
 	. = ALIGN(4K);
 	edata = .;
-- 
2.39.3


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

end of thread, other threads:[~2023-06-26 15:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-23  9:39 [kvm-unit-tests PATCH] s390x: Align __bss_end to a halfword boundary Thomas Huth
2023-06-26 15:34 ` Claudio Imbrenda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox