tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: clang/llvm on aarch64



On Wed, Aug 28, 2019 at 06:26:53PM +0100, Robert Swindells wrote:
> 
> Joerg Sonnenberger <joerg%bec.de@localhost> wrote:
> >On Wed, Aug 28, 2019 at 02:40:02AM +0100, Robert Swindells wrote:
> >> 
> >> I wrote:
> >> >It looks like clang++ on aarch64 is broken too, but in a different way.
> >> >
> >> >Static constructors don't get called. I do have a small test application
> >> >that demonstrates this.
> >> 
> >> This looks to be caused by clang/llvm putting the references to the
> >> constructor in the .ctors section instead of the .init_array section as
> >> required by the ABI.
> >
> >Both is supposed to work.
> 
> I don't think both are supposed to work.
> 
> The AARCH64 ABI and our startup code expects only to use .init_array.
> 
> There was an explicit clang patch to use .init_array for all AARCH64
> ELF, it just doesn't seem to be working, maybe as a result of adding
> other CPU/OS combinations to clang and llvm over time.

The linker is suppossed to convert them to .init_array.

Joerg


Home | Main Index | Thread Index | Old Index