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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdmuSaf28dOdP8Yo6+RyiviMNKcq8JY=-qgbwjbPVwHmLw@mail.gmail.com>
Date:   Fri, 29 Jan 2021 13:05:56 -0800
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Jakub Jelinek <jakub@...hat.com>, Nick Clifton <nickc@...hat.com>
Cc:     Sedat Dilek <sedat.dilek@...il.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Nathan Chancellor <natechancellor@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Clang-Built-Linux ML <clang-built-linux@...glegroups.com>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        Fangrui Song <maskray@...gle.com>,
        Caroline Tice <cmtice@...gle.com>, Yonghong Song <yhs@...com>,
        Jiri Olsa <jolsa@...nel.org>,
        Andrii Nakryiko <andrii@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Arvind Sankar <nivedita@...m.mit.edu>
Subject: Re: [PATCH v6 2/2] Kbuild: implement support for DWARF v5

On Fri, Jan 29, 2021 at 12:57 PM Jakub Jelinek <jakub@...hat.com> wrote:
>
> On Fri, Jan 29, 2021 at 12:48:11PM -0800, Nick Desaulniers wrote:
> > > Should this be...?
> > >
> > > KBUILD_AFLAGS += -Wa,-gdwarf-5
> >
> > No; under the set of conditions Clang is compiling .c to .S with DWARF
> > v5 assembler directives. GAS will choke unless told -gdwarf-5 via
> > -Wa,-gdwarf-5 for .c source files, hence it is a C flag, not an A
>
> Wasn't that fixed in GAS?
> https://sourceware.org/bugzilla/show_bug.cgi?id=27195

```
diff --git a/Makefile b/Makefile
index bed8b3b180b8..de616e584706 100644
--- a/Makefile
+++ b/Makefile
@@ -835,17 +835,6 @@ dwarf-version-$(CONFIG_DEBUG_INFO_DWARF4) := 4
 dwarf-version-$(CONFIG_DEBUG_INFO_DWARF5) := 5
 DEBUG_CFLAGS   += -gdwarf-$(dwarf-version-y)

-# If using clang without the integrated assembler, we need to explicitly tell
-# GAS that we will be feeding it DWARF v5 assembler directives. Kconfig should
-# detect whether the version of GAS supports DWARF v5.
-ifdef CONFIG_CC_IS_CLANG
-ifneq ($(LLVM_IAS),1)
-ifeq ($(dwarf-version-y),5)
-DEBUG_CFLAGS   += -Wa,-gdwarf-5
-endif
-endif
-endif
-
 ifdef CONFIG_DEBUG_INFO_REDUCED
 DEBUG_CFLAGS   += $(call cc-option, -femit-struct-debug-baseonly) \
                   $(call cc-option,-fno-var-tracking)
```

$ make LLVM=1 -j72 defconfig
$ ./scripts/config -e DEBUG_INFO -e DEBUG_INFO_DWARF5
$ make LLVM=1 -j72
...
/tmp/init-d50d89.s: Assembler messages:
/tmp/init-d50d89.s:10: Error: file number less than one
/tmp/init-d50d89.s:11: Error: junk at end of line, first unrecognized
character is `m'

which is https://sourceware.org/bugzilla/show_bug.cgi?id=25611.

$ as --version | head -n1
GNU assembler (GNU Binutils for Debian) 2.35.1

Maybe GAS should not need to be told -gdwarf-5 to parse these?  Then
we would not need to pass -Wa,-gdwarf-5 via clang with
-no-integrated-as.
-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ