]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
s390: Improve diagnostic for reloc against misaligned sym
authorJens Remus <jremus@linux.ibm.com>
Mon, 19 May 2025 08:38:01 +0000 (10:38 +0200)
committerJens Remus <jremus@linux.ibm.com>
Mon, 19 May 2025 08:38:01 +0000 (10:38 +0200)
commitd463846740dc791d9129574db9bd4bc83a7ff554
treea878b5c61ba80de872ec6f22b9bac5300bc4c482
parentb4917deea42ae90506f6c1cf196fb10fa17645fc
s390: Improve diagnostic for reloc against misaligned sym

Report the BFD in which a misaligned symbol is defined in the error
message.  This complements commit 906f69cf65da ("IBM zSystems: Issue
error for *DBL relocs on misaligned symbols").  While at it reword
the error message.

Old error message text (re-wrapped):
<sec-bfd>(<sec>+<off>): misaligned symbol `<sym>' (<addr>) for
                        relocation <rel>

New error message text (re-wrapped):
<sec-bfd>(<sec>+<off>): relocation <rel> against misaligned symbol
                        `<sym>' (<addr>) in <sym-bfd>

Note that the linker tests do not require to be updated, as they match
against the pattern ".*misaligned symbol.*", which has not changed in
the error message.

bfd/
PR ld/32969
* elf64-s390.c (elf_s390_relocate_section): Report BFD
in which a misaligned symbol is defined in error message.

Bug: https://sourceware.org/PR32969
Suggested-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
bfd/elf64-s390.c