lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJNi4rMHtM=39jzkzwqt++kVpSp0=XfDrVdY94WoW6B34oKwDA@mail.gmail.com>
Date: Tue, 2 Jan 2024 16:53:53 +0800
From: richard clark <richard.xnu.clark@...il.com>
To: gcc-help@....gnu.org
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: undefined reference to `__aarch64_cas4_sync' error on arm64
 native build

Ah, the driver is trying to use the native gcc built atomic ops like:
__sync_val_compare_and_swap, but it seems the native aarch64 doesn't
provide these builtin atomic primitives while they are in the cross
compile toolchain.
The issue can be resolved by replacing the
**__sync_val_compare_and_swap** with **atomic_cmpxchg**.
But don't know why the native aarch64 toolchain doesn't have those
builtin atomic functions...

On Tue, Jan 2, 2024 at 11:29 AM richard clark
<richard.xnu.clark@...il.com> wrote:
>
> Hi,
>
> I have a strong power arm64 box, and the linux distro is ubuntu 22.04,
> the native gcc version is:
>
> $ gcc --version
> gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
> Copyright (C) 2021 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> It will abort the kernel build with the complaint by 'make Image':
> ld: Unexpected GOT/PLT entries detected!
> ld: Unexpected run-time procedure linkages detected!
> ld: ID map text too big or misaligned
> ld: drivers/net/nvidia_eth.o: in function `osi_lock_irq_enabled':
> osi_hal.c:(.text+0x3cc): undefined reference to `__aarch64_cas4_sync'
> ...
>
> But the cross-compile with aarch64-linux-gnu-gcc on the x86 box
> doesn't show the above error message.
> Any comments/suggestions? Thanks very much!
>
> Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ