]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
sframe: Ignore section padding when converting endianness
authorJens Remus <jremus@linux.ibm.com>
Fri, 11 Jul 2025 08:29:40 +0000 (10:29 +0200)
committerJens Remus <jremus@linux.ibm.com>
Fri, 11 Jul 2025 08:29:40 +0000 (10:29 +0200)
commitb36a8e57eaa45df0d57cbc87db6734beed074ccc
treed2e965b57202ce3130872c279788b073d7bcc2a3
parentcbc7579dd2ef14b68158c1fc866f7d43dc3ef253
sframe: Ignore section padding when converting endianness

The .sframe section may have a trailing padding due to the architecture-
specific default section alignment.  Do not treat this padding as error
when converting between target and host endianness.

This can be observed when building Binutils with SFrame s390x support on
x86-64 for s390x using configure option "--target=s390x-ibm-linux-gnu"
and running the GAS test suite.

While at it reuse the determined SFrame section header size.

libsframe/
* sframe.c (flip_sframe): Ignore .sframe section padding.  Reuse
SFrame header size.

Reported-by: Indu Bhagat <indu.bhagat@oracle.com>
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
libsframe/sframe.c