-
- Downloads
asan: Align .LASANPC on function boundary
GCC can emit code between the function label and the .LASANPC label, making the latter unaligned. Some architectures cannot load unaligned labels directly and require literal pool entries, which is inefficient. Move the invocation of asan_function_start to ASM_OUTPUT_FUNCTION_LABEL, which guarantees that no additional code is emitted. This allows setting the .LASANPC label alignment to the respective function alignment. Link: https://inbox.sourceware.org/gcc-patches/20240102194511.3171559-3-iii@linux.ibm.com/ Signed-off-by:Ilya Leoshkevich <iii@linux.ibm.com> gcc/ChangeLog: * asan.cc (asan_function_start): Drop switch_to_section (). (asan_emit_stack_protection): Set .LASANPC alignment. * config/i386/i386.cc: Use assemble_function_label_raw () instead of ASM_OUTPUT_LABEL (). * config/s390/s390.cc (s390_asm_output_function_label): Likewise. * defaults.h (ASM_OUTPUT_FUNCTION_LABEL): Likewise. * final.cc (final_start_function_1): Drop asan_function_start (). * output.h (assemble_function_label_raw): New function. * varasm.cc (assemble_function_label_raw): Likewise.
Showing
- gcc/asan.cc 2 additions, 4 deletionsgcc/asan.cc
- gcc/config/i386/i386.cc 1 addition, 1 deletiongcc/config/i386/i386.cc
- gcc/config/s390/s390.cc 1 addition, 1 deletiongcc/config/s390/s390.cc
- gcc/defaults.h 1 addition, 1 deletiongcc/defaults.h
- gcc/final.cc 0 additions, 3 deletionsgcc/final.cc
- gcc/output.h 4 additions, 0 deletionsgcc/output.h
- gcc/varasm.cc 14 additions, 0 deletionsgcc/varasm.cc
Loading
Please register or sign in to comment