[libc-commits] [libc] [libc][arm32] define argc type and stack alignment (PR #96367)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Mon Jun 24 09:00:14 PDT 2024


nickdesaulniers wrote:

> > https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst#6212stack-constraints-at-a-public-interface mentions that ARM32 is double word aligned.
> > I could not find a citation for the size of argc on the stack, but from reading Bionic's loader and the Linux kernel's ELF loader, it seems this is the same for all targets (8B despite argc being an int).
> 
> i'm assuming this is a typo here --- s/size/alignment/. bionic quite clearly believes it's 4 bytes in _size_ and has no particular belief about the alignment at all: https://android.googlesource.com/platform/bionic/+/main/libc/private/KernelArgumentBlock.h#34

No, I had meant size, but rereading that part of Bionic, I was wrong.  I had read exactly that code last week, but made a mistake in my understanding. I'll update the commit message and PR description.

https://github.com/llvm/llvm-project/pull/96367


More information about the libc-commits mailing list