]> gcc.gnu.org Git - gcc.git/commit
IBM Z: Fix -munaligned-symbols
authorAndreas Krebbel <krebbel@linux.ibm.com>
Thu, 14 Mar 2024 08:54:31 +0000 (09:54 +0100)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Thu, 14 Mar 2024 09:51:57 +0000 (10:51 +0100)
commit90a7da695284da49182446ba45fbcddb9eb7fc91
tree6ba55dd468343a688561e0af94262a465f73ff08
parent8f6e0814b4bfd0a399055e9214562aebfcd902ad
IBM Z: Fix -munaligned-symbols

With this fix we make sure that only symbols with a natural alignment
smaller than 2 are considered misaligned with
-munaligned-symbols. Background is that -munaligned-symbols is only
supposed to affect symbols whose natural alignment wouldn't be enough
to fulfill our ABI requirement of having all symbols at even
addresses. Because only these are the cases where we differ from other
architectures.

gcc/ChangeLog:

* config/s390/s390.cc (s390_encode_section_info): Adjust the check
for misaligned symbols.
* config/s390/s390.opt: Improve documentation.

gcc/testsuite/ChangeLog:

* gcc.target/s390/aligned-1.c: Add weak and void variables
incorporating the cases from unaligned-2.c.
* gcc.target/s390/unaligned-1.c: Likewise.
* gcc.target/s390/unaligned-2.c: Removed.
gcc/config/s390/s390.cc
gcc/config/s390/s390.opt
gcc/testsuite/gcc.target/s390/aligned-1.c
gcc/testsuite/gcc.target/s390/unaligned-1.c
gcc/testsuite/gcc.target/s390/unaligned-2.c [deleted file]
This page took 0.054955 seconds and 5 git commands to generate.