v1: 
https://inbox.sourceware.org/gcc-patches/20231207121005.3425208-1-...@linux.ibm.com/
v1 -> v2: Fix style issues (Jakub).
          Jakub has reviewed patch 2 and mentioned that he'd defer the
          patch 1 review to Jeff.



Hi,

this is another attempt to fix the .LASANPC alignment on s390x.
Currently it's not only inefficient ([1]-[5]), but also causes linker
errors in template-heavy code ([6]).

The previous attempts to add a new constant for minimum code alignment
value ([1]-[5]) did not arouse considerable enthusiasm, and fixing the
fallout ([6]) is probably just a wrong thing to do.

So here I'm taking another approach: making sure that .LASANPC is
aligned on function boundary in the first place.  This requires moving
the asan_function_start() invocation to ASM_OUTPUT_FUNCTION_LABEL().

Bootstrapped and regtested on x86_64-redhat-linux, ppc64le-redhat-linux
and s390x-redhat-linux.  Compile tested for platforms listed in [7].

Best regards,
Ilya

[1] https://gcc.gnu.org/pipermail/gcc-patches/2019-July/525016.html
[2] https://gcc.gnu.org/pipermail/gcc-patches/2019-July/525069.html
[3] https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548338.html
[4] https://gcc.gnu.org/pipermail/gcc-patches/2020-July/549252.html
[5] https://patchwork.ozlabs.org/project/gcc/list/?series=320223
[6] https://patchwork.ozlabs.org/project/gcc/list/?series=297132
[7] http://toolchain.lug-owl.de/laminar/jobs

Ilya Leoshkevich (2):
  Implement ASM_DECLARE_FUNCTION_NAME using ASM_OUTPUT_FUNCTION_LABEL
  asan: Align .LASANPC on function boundary

 gcc/asan.cc                         |  6 ++----
 gcc/config/aarch64/aarch64.cc       |  2 +-
 gcc/config/alpha/alpha.cc           |  5 ++---
 gcc/config/arm/aout.h               |  2 +-
 gcc/config/arm/arm.cc               |  2 +-
 gcc/config/bfin/bfin.h              | 16 ++++++++--------
 gcc/config/c6x/c6x.h                |  2 +-
 gcc/config/gcn/gcn.cc               |  5 ++---
 gcc/config/h8300/h8300.h            |  2 +-
 gcc/config/i386/i386.cc             |  2 +-
 gcc/config/ia64/ia64.cc             |  5 ++---
 gcc/config/mcore/mcore-elf.h        |  2 +-
 gcc/config/microblaze/microblaze.cc |  3 +--
 gcc/config/mips/mips.cc             | 19 ++++++++++---------
 gcc/config/pa/pa.cc                 |  3 ++-
 gcc/config/riscv/riscv.cc           |  2 +-
 gcc/config/rs6000/rs6000.cc         |  4 ++--
 gcc/config/s390/s390.cc             |  2 +-
 gcc/defaults.h                      |  2 +-
 gcc/final.cc                        |  3 ---
 gcc/output.h                        |  4 ++++
 gcc/varasm.cc                       | 14 ++++++++++++++
 22 files changed, 59 insertions(+), 48 deletions(-)

-- 
2.43.0

Reply via email to