platform_bionic/libc/arch-x86/bionic
Peter Collingbourne 8bd83d8c98 Hide overaligned global address from the compiler.
The address of contents is only guaranteed to be aligned to 4KB on
4KB page size systems, but the compiler was generating code that
assumed it to be aligned to 64KB, which broke on a 4KB page size
system. This probably ought to be fixed, either in the compiler so
it can't generate code assuming such large alignments (it's hard to
see what useful optimizations are possible by assuming such large
alignments anyway) or by making bionic respect the p_align field in
PT_LOAD, but for now let's hide the address behind an asm statement
that the compiler can't see through.

As a result of this change, the code generation for the function
__bionic_setjmp_cookie_get on x86 changed so that it clobbers ecx,
as allowed by the calling convention. However, the x86 assembly
implementation for setjmp was assuming that it wouldn't be
clobbered. Fix it.

Bug: 332534664
Change-Id: I07fa737d8cf892d27ce08c305dafb0a53fef36cb
2024-04-04 16:33:01 -07:00
..
__bionic_clone.S Clear the stack frame pointer in _start and __bionic_clone 2021-05-07 15:00:55 -07:00
__libc_init_sysinfo.cpp Move __libc_int0x80 to an assembly file 2021-02-18 09:52:59 -08:00
__libc_int0x80.S Move __libc_int0x80 to an assembly file 2021-02-18 09:52:59 -08:00
__set_tls.cpp <stdbool.h> not necessary in C++. 2017-09-07 13:28:14 -07:00
__x86.get_pc_thunk.S x86: Switch get_pc_thunk to comdat 2020-04-20 14:28:10 -07:00
_exit_with_stack_teardown.S Hide _exit_with_stack_teardown. 2014-05-16 16:17:44 -07:00
atexit.h Replace .S version of x86 crtfiles with .c version 2012-11-30 17:41:25 +04:00
libcrt_compat.c Switch libc to libcrt.builtins 2019-02-15 12:46:19 -08:00
setjmp.S Hide overaligned global address from the compiler. 2024-04-04 16:33:01 -07:00
syscall.S libc: implement kernel vdso syscalls for i386 2016-03-25 14:10:05 -07:00
vfork.S Fix assembler warnings. 2024-01-23 22:06:19 +00:00