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] [day] [month] [year] [list]
Date:   Mon, 21 Mar 2022 10:27:03 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Ammar Faizi <ammarfaizi2@...weeb.org>
Cc:     Willy Tarreau <w@....eu>, "Paul E. McKenney" <paulmck@...nel.org>,
        Alviro Iskandar Setiawan <alviro.iskandar@...weeb.org>,
        Nugraha <richiisei@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "GNU/Weeb Mailing List" <gwml@...r.gnuweeb.org>,
        llvm@...ts.linux.dev
Subject: Re: [RFC PATCH v1 2/6] tools/nolibc: Make the entry point not weak
 for clang

On Mon, Mar 21, 2022 at 4:38 AM Ammar Faizi <ammarfaizi2@...weeb.org> wrote:
>
> On 3/21/22 2:16 AM, Willy Tarreau wrote:
> > Hi Ammar,
> >
> > I've had a look at this one.
> >
> > On Sun, Mar 20, 2022 at 04:37:46PM +0700, Ammar Faizi wrote:
> >> Budilig with clang yields the following error:
> >    ^^^^^^^
> > BTW please fix the typo in the final commit message.
> >
> >> @@ -183,7 +183,9 @@ struct sys_stat_struct {
> >>
> >>   /* startup code */
> >>   asm(".section .text\n"
> >> +#if !defined(__clang__)
> >>       ".weak _start\n"
> >> +#endif
> >>       ".global _start\n"
> >>       "_start:\n"
> >
> > So it seems that I was wrong and that .weak is an alternate for .global
> > and not a complement. As such, instead of adding all these #if, please
> > simply remove all .global.

See also:
commit 4d6ffa27b8e5 ("x86/lib: Change .weak to SYM_FUNC_START_WEAK for
arch/x86/lib/mem*_64.S")
commit ec9d78070de9 ("arm64: Change .weak to SYM_FUNC_START_WEAK_PI
for arch/arm64/lib/mem*.S")

Also, please note in the commit message that this diagnostic comes
from using clang as the assembler (which is clang's default behavior
unless -fno-integrated-as is passed).

>
> Will fix this in the next version.
>
> --
> Ammar Faizi
>


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ