Reviewed-by: Fangrui Song
Inlined some suggestions.
On 2021-04-14, Alex Shi wrote:
Reviewed-by: Alex Shi
On 2021/4/14 下午9:21, Wu XiangCheng wrote:
From: Bernard Zhao
Add new zh translations
* zh_CN/dev-tools/gcov.rst
* zh_CN/dev-tools/index.rst
and link them to zh_CN/index.rst
Signed
pos += store_gcov_u32(buffer, pos, GCOV_TAG_COUNTER_BASE);
pos += store_gcov_u32(buffer, pos, fi_ptr->num_counters * 2);
for (i = 0; i < fi_ptr->num_counters; i++)
--
2.31.1.295.g9ea45b61b8-goog
Looks good for both. Thanks!
Reviewed-by: Fangrui Song
style=both
can be --hash-style=gnu. We don't need sysv .hash . The glibc/musl
support for .gnu.hash has been there for years. .gnu.hash is often
smaller than .hash .
Reviewed-by: Fangrui Song
Additionally, since this area is being modified, use the $(OBJCOPY)
variable instead of an open coded
On 2021-03-26, Nathan Chancellor wrote:
On Sat, Mar 27, 2021 at 12:05:34AM +0800, kernel test robot wrote:
Hi Nathan,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.12-rc4 next-20210326]
[If your patch is applied to the
is
not available.
If clang -fpatchable-function-entry=8 does not error "unsupported
option" for one target, it means the backend feature is supported on
this target.
Reviewed-by: Fangrui Song
Fixes: afc76b8b8011 ("riscv: Using PATCHABLE_FUNCTION_ENTRY instead of MCOUNT")
Link
this, the __start_mcount_loc section is properly generated and
function tracing still works.
R_RISCV_CALL_PLT can replace R_RISCV_CALL in all use cases.
R_RISCV_CALL can/may be deprecated:
https://github.com/ClangBuiltLinux/linux/issues/1331#issuecomment-802468296
Reviewed-by: Fangrui Song
Cc: sta
On 2021-03-12, Nick Desaulniers wrote:
On Fri, Mar 12, 2021 at 12:25 PM 'Fangrui Song' via Clang Built Linux
wrote:
function_name can be unconditionally deleted. It is not used by llvm-cov
gcov. You'll need to delete a few assignments to gcov_info_free but you
can then unify
://reviews.llvm.org/rGcdd683b516d147925212724b09ec6fb792a40041
Link: https://reviews.llvm.org/rG13a633b438b6500ecad9e4f936ebadf3411d0f44
Cc: Fangrui Song
Reported-by: Prasad Sodagudi
Signed-off-by: Nick Desaulniers
---
kernel/gcov/clang.c | 69 +
1 file changed, 69
On 2021-03-10, Nicolas Pitre wrote:
On Mon, 1 Mar 2021, Nicholas Piggin wrote:
Excerpts from Arnd Bergmann's message of February 27, 2021 7:49 pm:
> Unlike what Nick expected in his submission, I now think the annotations
> will be needed for LTO just like they are for --gc-sections.
Yeah I
On 2021-03-10, Arnd Bergmann wrote:
On Wed, Mar 10, 2021 at 9:50 PM Masahiro Yamada wrote:
On Mon, Mar 1, 2021 at 10:11 AM Nicholas Piggin wrote:
> Excerpts from Arnd Bergmann's message of February 27, 2021 7:49 pm:
masahiro@oscar:~/ref/linux$ echo 'void this_func_is_unused(void) {}'
>>
llor
The wording looks good.
Reviewed-by: Fangrui Song
with CONFIG_PPC_OF_BOOT_TRAMPOLINE=y
is bootable with LLD. There is still an untriaged issue with Alexey's
configuration.
Link: https://github.com/ClangBuiltLinux/linux/issues/1318
Reported-by: Alexey Kardashevskiy
Signed-off-by: Fangrui Song
---
arch/powerpc/boot/crt0.S| 2 +-
arch/powerpc/boot
On 2021-03-03, Masahiro Yamada wrote:
Hi.
On Wed, Mar 3, 2021 at 6:44 AM Fangrui Song wrote:
Reviewed-by: Fangrui Song
Thanks for the clean-up!
--gcc-toolchain= is an obsscure way searching for GCC installation prefixes
(--prefix).
The logic is complex and different for different
Chancellor
Reviewed-by: Fangrui Song
clang can spawn GNU as (if -f?no-integrated-as is specified) and GNU
objcopy (-f?no-integrated-as and -gsplit-dwarf and -g[123]).
With LLVM_IAS=1, these cases are ruled out.
Reviewed-by: Fangrui Song
Thanks for the clean-up!
--gcc-toolchain= is an obsscure way searching for GCC installation prefixes
(--prefix).
The logic is complex and different for different distributions/architectures.
If we specify --prefix= (-B) explicitly, --gcc-toolchain is not needed
On 2021-02-28, Fangrui Song wrote:
Reviewed-by: Fangrui Song
Some minor items below:
On 2021-02-26, 'Bill Wendling' via Clang Built Linux wrote:
From: Sami Tolvanen
Enable the use of clang's Profile-Guided Optimization[1]. To generate a
profile, the kernel is instrumented with PGO counters
Reviewed-by: Fangrui Song
Some minor items below:
On 2021-02-26, 'Bill Wendling' via Clang Built Linux wrote:
From: Sami Tolvanen
Enable the use of clang's Profile-Guided Optimization[1]. To generate a
profile, the kernel is instrumented with PGO counters, a representative
workload is run
On 2021-02-28, Masahiro Yamada wrote:
This commit reverts 0bf6276392e9 ("x32: Warn and disable rather than
error if binutils too old").
The help text in arch/x86/Kconfig says enabling the X32 ABI support
needs binutils 2.22 or later. This is met because the minimal binutils
version is 2.23
und problems, but it not good for CONFIG_LD_DEAD_CODE_DATA_ELIMINATION.
Reviewed-by: Fangrui Song
This happens when any reference to the trampoline is discarded at link
time. Marking the section as KEEP() avoids the assertion, but I have
not figured out whether this is the correct solution for th
On 2021-02-25, Arnd Bergmann wrote:
From: Arnd Bergmann
When looking at kernel size optimizations, I found that arm64
does not currently support HAVE_LD_DEAD_CODE_DATA_ELIMINATION,
which enables the --gc-sections flag to the linker.
I see that for a defconfig build with llvm, there are some
On 2021-02-04, Nick Desaulniers wrote:
On Thu, Feb 4, 2021 at 12:28 PM Mark Wielaard wrote:
On Thu, 2021-02-04 at 12:04 -0800, Nick Desaulniers wrote:
> On Thu, Feb 4, 2021 at 11:56 AM Mark Wielaard wrote:
> > I agree with Jakub. Now that GCC has defaulted to DWARF5 all the
> > tools
> >
atible with existing
> configs, and makes adding future versions more straightforward.
>
> GCC since ~4.8 has defaulted to this DWARF version implicitly.
>
> Suggested-by: Arvind Sankar
> Suggested-by: Fangrui Song
> Suggested-by: Nathan Chancellor
> Suggested-by: Masahiro
ine Tice
Suggested-by: Fangrui Song
Suggested-by: Jakub Jelinek
Suggested-by: Masahiro Yamada
Suggested-by: Nathan Chancellor
Signed-off-by: Nick Desaulniers
---
Makefile | 12
include/asm-generic/vmlinux.lds.h | 6 +-
lib/Kconfig.de
ine Tice
Suggested-by: Fangrui Song
Suggested-by: Jakub Jelinek
Suggested-by: Masahiro Yamada
Suggested-by: Nathan Chancellor
Signed-off-by: Nick Desaulniers
---
Makefile | 12
include/asm-generic/vmlinux.lds.h | 6 +-
lib/Kconfig.de
d(CONFIG_GCOV_KERNEL)
# ifdef CONFIG_CONSTRUCTORS
# define SANITIZER_DISCARDS \
*(.eh_frame)
base-commit: bec4c2968fce2f44ce62d05288a633cd99a722eb
--
2.30.0
Drop -ftest-coverage. -ftest-coverage just produces .gcno and does not
affect code gen
The following commit has been merged into the x86/build branch of tip:
Commit-ID: bb73d07148c405c293e576b40af37737faf23a6a
Gitweb:
https://git.kernel.org/tip/bb73d07148c405c293e576b40af37737faf23a6a
Author:Fangrui Song
AuthorDate:Wed, 27 Jan 2021 12:56:00 -08:00
Committer
s,
because preventing canonical PLT entries is weighed over the rare ifunc
diagnostic.
Link: https://github.com/ClangBuiltLinux/linux/issues/1210
Reported-by: Arnd Bergmann
Signed-off-by: Fangrui Song
Reviewed-by: Nick Desaulniers
Reviewed-by: Nathan Chancellor
Tested-by: Nick Desaulniers
Tested-
github.com/ClangBuiltLinux/linux/issues/1210
Reported-by: Arnd Bergmann
Signed-off-by: Fangrui Song
Reviewed-by: Nick Desaulniers
Reviewed-by: Nathan Chancellor
Tested-by: Nick Desaulniers
Tested-by: Nathan Chancellor
On Thu, Jan 14, 2021 at 02:48:19PM -0800, Fangrui Song wrote:
This is similar
On 2020-08-28, Josh Poimboeuf wrote:
On Fri, Aug 28, 2020 at 12:21:13PM +0200, Miroslav Benes wrote:
> Hi there! I was trying to find a super easy way to address this, so I
> thought the best thing would be if there were a compiler or linker
> switch to just eliminate any duplicate symbols at
On 2021-01-19, Tiezhu Yang wrote:
The current llvm/clang build procedure in samples/bpf/README.rst is
out of date. See below that the links are not accessible any more.
$ git clone http://llvm.org/git/llvm.git
Cloning into 'llvm'...
fatal: unable to access 'http://llvm.org/git/llvm.git/':
adding
future versions more straightforward.
Suggested-by: Arvind Sankar
Suggested-by: Fangrui Song
Suggested-by: Masahiro Yamada
Signed-off-by: Nick Desaulniers
---
Makefile | 13 ++---
lib/Kconfig.debug | 21 -
2 files changed, 22 insertions(+), 12
On 2021-01-15, Nick Desaulniers wrote:
From: Masahiro Yamada
The -gdwarf-4 flag is supported by GCC 4.5+, and also by Clang.
You can see it at https://godbolt.org/z/6ed1oW
For gcc 4.5.3 pane,line 37:.value 0x4
For clang 10.0.1 pane, line 117: .short 4
Given
On 2021-01-15, Anders Roxell wrote:
On Fri, 15 Jan 2021 at 20:28, Nathan Chancellor
wrote:
On Fri, Jan 15, 2021 at 08:13:30PM +0100, Anders Roxell wrote:
> When building mips tinyconifg the following warning show up
>
> make --silent --keep-going --jobs=8
ode should be refactored to ignore
unreferenced symbols.
Reported-by: Marco Elver
Link: https://github.com/ClangBuiltLinux/linux/issues/1250
Signed-off-by: Fangrui Song
Reviewed-by: Nick Desaulniers
Tested-by: Marco Elver
Cc:
---
Changes in v2:
* Fix Marco's email address
* Add a funct
lity ifunc for shared objects.
https://sourceware.org/bugzilla/show_bug.cgi?id=27169
Link: https://github.com/ClangBuiltLinux/linux/issues/1210
Reported-by: Arnd Bergmann
Signed-off-by: Fangrui Song
Reviewed-by: Nick Desaulniers
Reviewed-by: Nathan Chancellor
Tested-by: Nick Desaulniers
Tested-
ode should be refactored to ignore
unreferenced symbols.
Reported-by: Marco Elver
Link: https://github.com/ClangBuiltLinux/linux/issues/1250
Signed-off-by: Fangrui Song
---
kernel/module.c | 20 ++--
1 file changed, 18 insertions(+), 2 deletions(-)
---
Changes in v2:
* Fix Marco's em
ode should be refactored to ignore
unreferenced symbols.
Reported-by: Marco Elver
Link: https://github.com/ClangBuiltLinux/linux/issues/1250
Signed-off-by: Fangrui Song
---
kernel/module.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/kernel/module.c b/kernel/modul
if they do not exist in object files.
rg 'SYM_CODE.*\.L' reveals a few other .S files which may have similar problems.
Cc: Fangrui Song
Link: https://github.com/ClangBuiltLinux/linux/issues/1209
Link: https://reviews.llvm.org/D93783
Link: https://sourceware.org/binutils/docs/as/Symbol-Names.html
Link
On 2021-01-11, Bill Wendling wrote:
On Mon, Jan 11, 2021 at 12:12 PM Fangrui Song wrote:
On 2021-01-11, 'Bill Wendling' via Clang Built Linux wrote:
>From: Sami Tolvanen
>
>Enable the use of clang's Profile-Guided Optimization[1]. To generate a
>profile, the kernel is instrumen
On 2021-01-11, 'Bill Wendling' via Clang Built Linux wrote:
From: Sami Tolvanen
Enable the use of clang's Profile-Guided Optimization[1]. To generate a
profile, the kernel is instrumented with PGO counters, a representative
workload is run, and the raw profile data is collected from
/llvm-project/commit/961f31d8ad14c66829991522d73e14b5a96ff6d4
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98112
Reported-by: Arnd Bergmann
Signed-off-by: Fangrui Song
Reviewed-by: Nick Desaulniers
Reviewed-by: Nathan Chancellor
Tested-by: Nick Desaulniers
Tested-by: Nathan Chancellor
---
Change in
CFLAGS += $(cflags-y)
-
-# temporary until string.h is fixed
-KBUILD_CFLAGS += -ffreestanding
else
BITS := 64
UTS_MACHINE := x86_64
--
2.28.0.220.ged08abb693-goog
Reviewed-by: Fangrui Song
But dropping -ffreestanding causes compiler produced declarations
rted-by: Arnd Bergmann
Signed-off-by: Fangrui Song
---
arch/x86/kernel/module.c | 1 +
arch/x86/tools/relocs.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index 34b153cbd4ac..5e9a34b5bd74 100644
--- a/arch/x86/kernel/module.c
On 2020-12-22, 'Nick Desaulniers' via Clang Built Linux wrote:
Hello!
I was playing with some of LLVM's experimental backends (m68k) and saw
there was a CSKY backend. I rebuilt LLVM to support CSKY, but I ran
into trouble building the kernel before even getting to the compiler
invocation:
$
On 2020-12-08, 'Sami Tolvanen' via Clang Built Linux wrote:
On Tue, Dec 8, 2020 at 4:15 AM Arnd Bergmann wrote:
On Tue, Dec 1, 2020 at 10:37 PM 'Sami Tolvanen' via Clang Built Linux
wrote:
>
> This patch series adds support for building the kernel with Clang's
> Link Time Optimization
ALIGN(8).
Fixes: 5658c76 ("firmware: allow firmware files to be built into kernel image")
Link: https://github.com/ClangBuiltLinux/linux/issues/1204
Reported-by: kernel test robot
Signed-off-by: Fangrui Song
Acked-by: Arnd Bergmann
---
Change in v2:
* Use output section alignme
On 2020-12-03, Nick Desaulniers wrote:
On Thu, Dec 3, 2020 at 9:05 AM Fangrui Song wrote:
arm64 references the start address of .builtin_fw (__start_builtin_fw)
with a pair of R_AARCH64_ADR_PREL_PG_HI21/R_AARCH64_LDST64_ABS_LO12_NC
relocations. The compiler is allowed to emit
ink: https://github.com/ClangBuiltLinux/linux/issues/1204
Reported-by: kernel test robot
Signed-off-by: Fangrui Song
---
include/asm-generic/vmlinux.lds.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/asm-generic/vmlinux.lds.h
b/include/asm-generic/vmlinux.lds.h
index b2b3d81b1535..3c
, the option is of very low value, at least for LLVM.
Reviewed-by: Fangrui Song
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 4d6ffa27b8e5116c0abb318790fd01d4e12d75e6
Gitweb:
https://git.kernel.org/tip/4d6ffa27b8e5116c0abb318790fd01d4e12d75e6
Author:Fangrui Song
AuthorDate:Mon, 02 Nov 2020 17:23:58 -08:00
lude/linux/linkage.h
Fixes: 7d7d1bf1d1da ("perf bench: Copy kernel files needed to build
mem{cpy,set} x86_64 benchmarks")
Link: https://lore.kernel.org/r/20201103012358.168682-1-mask...@google.com
Signed-off-by: Fangrui Song
---
tools/arch/x86/lib/memcpy_64.S | 4 +---
tools/arch
One nit about ".got" in the message:
Reviewed-by: Fangrui Song
On 2020-10-27, Nick Desaulniers wrote:
+ Fangrui
On Tue, Oct 27, 2020 at 8:11 AM Ard Biesheuvel wrote:
Geert reports that commit be2881824ae9eb92 ("arm64/build: Assert for
unwanted sections") results in b
On 2020-10-21, 'Nick Desaulniers' via Clang Built Linux wrote:
DWARF5 is the latest standard of the DWARF debug info format.
Feature detection of DWARF5 is onerous, especially given that we've
removed $(AS), so we must query $(CC) for DWARF5 assembler directive
support. Further -gdwarf-X where
On 2020-09-16, 'Marco Elver' via Clang Built Linux wrote:
On Wed, 16 Sep 2020 at 20:22, 'Nick Desaulniers' via kasan-dev
wrote:
On Wed, Sep 16, 2020 at 1:46 AM Marco Elver wrote:
>
> On Wed, 16 Sep 2020 at 10:30, wrote:
> > On Tue, Sep 15, 2020 at 08:09:16PM +0200, Marco Elver wrote:
> > >
-6?
(Both gcc|clang -fmerge-all-constants can cause an assertion failure for
the example on https://bugs.llvm.org/show_bug.cgi?id=18538 )
Reviewed-by: Fangrui Song
---
Makefile | 9 -
1 file changed, 9 deletions(-)
diff --git a/Makefile b/Makefile
index 37739ee53f27..144ac6a07
ernal
linker scripts (ld --verbose output) use 0 for such non-SHF_ALLOC sections.
Without the 0, the section may get a non-zero address, which is not
wrong - but probably does not look well. See https://reviews.llvm.org/D85867
for details.
Reviewed-by: Fangrui Song
+
#d
On 2020-08-15, 'Nick Desaulniers' via Clang Built Linux wrote:
On Sat, Aug 15, 2020 at 2:31 PM Joe Perches wrote:
On Sat, 2020-08-15 at 14:28 -0700, Nick Desaulniers wrote:
> On Sat, Aug 15, 2020 at 2:24 PM Joe Perches wrote:
> > On Sat, 2020-08-15 at 13:47 -0700, Nick Desaulniers wrote:
> >
On 2020-07-22, Masahiro Yamada wrote:
On Wed, Jul 22, 2020 at 9:14 AM Fangrui Song wrote:
On 2020-07-22, Masahiro Yamada wrote:
>On Wed, Jul 22, 2020 at 2:31 AM 'Fangrui Song' via Clang Built Linux
> wrote:
>>
>> When CROSS_COMPILE is set (e.g. aarch64-linux-gnu-), if
On 2020-07-22, Masahiro Yamada wrote:
On Wed, Jul 22, 2020 at 2:31 AM 'Fangrui Song' via Clang Built Linux
wrote:
When CROSS_COMPILE is set (e.g. aarch64-linux-gnu-), if
$(CROSS_COMPILE)elfedit is found at /usr/bin/aarch64-linux-gnu-elfedit,
GCC_TOOLCHAIN_DIR will be set to /usr/bin
find the
appropriate cross compiling GNU as (when -no-integrated-as is in
effect).
Cc: sta...@vger.kernel.org
Reported-by: Nathan Chancellor
Signed-off-by: Fangrui Song
Reviewed-by: Nathan Chancellor
Tested-by: Nathan Chancellor
Tested-by: Nick Desaulniers
Link: https://github.com
find the
appropriate cross compiling GNU as (when -no-integrated-as is in
effect).
Reported-by: Nathan Chancellor
Signed-off-by: Fangrui Song
Reviewed-by: Nathan Chancellor
Tested-by: Nathan Chancellor
Tested-by: Nick Desaulniers
Link: https://github.com/ClangBuiltLinux/linux/issues/1099
On 2020-07-20, Nick Desaulniers wrote:
On Mon, Jul 20, 2020 at 11:16 AM Nathan Chancellor
wrote:
On Mon, Jul 20, 2020 at 11:12:22AM -0700, Fangrui Song wrote:
> When CROSS_COMPILE is set (e.g. aarch64-linux-gnu-), if
> $(CROSS_COMPILE)elfedit is found at /usr/bin/aarch64-lin
-by: Nathan Chancellor
Signed-off-by: Fangrui Song
Link: https://github.com/ClangBuiltLinux/linux/issues/1099
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 0b5f8538bde5..3ac83e375b61 100644
--- a/Makefile
+++ b/Makefile
@@ -567,7 +567,7
On 2020-07-09, 'Nick Desaulniers' via Clang Built Linux wrote:
Hi Segher, Rasmus, and Ramana,
I am working on finalizing a proposal for an LLVM microconference at
plumbers, which is focusing on a lot of issues we currently face on
the LLVM side.
I'd really like to host a session with more GNU
* Ard Biesheuvel
On Tue, 30 Jun 2020 at 01:34, Fangrui Song wrote:
>
> On 2020-06-29, Ard Biesheuvel wrote:
> >On Mon, 29 Jun 2020 at 19:37, Fangrui Song wrote:
> >>
> >> On 2020-06-29, Arvind Sankar wrote:
> >> >On Mon, Jun 29, 2020 at 09:20:31AM -070
On 2020-06-29, Ard Biesheuvel wrote:
On Mon, 29 Jun 2020 at 19:37, Fangrui Song wrote:
On 2020-06-29, Arvind Sankar wrote:
>On Mon, Jun 29, 2020 at 09:20:31AM -0700, Kees Cook wrote:
>> On Mon, Jun 29, 2020 at 06:11:59PM +0200, Ard Biesheuvel wrote:
>> > On Mon, 29 Jun 2
ker option, as they
> > > are available in all supported gcc and binutils versions (as well as
> > > clang and lld).
> > >
> > > Signed-off-by: Arvind Sankar
> > > Reviewed-by: Ard Biesheuvel
> > > Reviewed-by: Fangrui Song
> > > ---
On 2020-06-24, Arvind Sankar wrote:
On Wed, Jun 24, 2020 at 09:16:43AM -0700, Fangrui Song wrote:
On 2020-06-24, Arvind Sankar wrote:
>On Tue, Jun 23, 2020 at 06:49:33PM -0700, Kees Cook wrote:
>> When linking vmlinux with LLD, the synthetic sections .symtab, .strtab,
>>
n '.symtab'
ld.lld: warning: :(.shstrtab) is being placed in '.shstrtab'
ld.lld: warning: :(.strtab) is being placed in '.strtab'
[1] https://lore.kernel.org/lkml/2020064928.o2a7jkq33guxf...@google.com/
Reported-by: Fangrui Song
Reviewed-by: Fangrui Song
Signed-off-by: Kees Cook
---
includ
On 2020-06-23, Kees Cook wrote:
In preparation for adding --orphan-handling=warn to more architectures,
make sure unwanted sections don't end up appearing under the .init
section prefix that libstub adds to itself during objcopy.
Signed-off-by: Kees Cook
---
On 2020-06-22, Kees Cook wrote:
On Mon, Jun 22, 2020 at 03:00:43PM -0700, Fangrui Song wrote:
On 2020-06-22, Kees Cook wrote:
> For vmlinux linking, no architecture uses the .gnu.version* section,
> so remove it via the common DISCARDS macro in preparation for adding
> --orphan-hand
On 2020-06-22, Kees Cook wrote:
On Mon, Jun 22, 2020 at 03:06:28PM -0700, Fangrui Song wrote:
LLD may report warnings for 3 synthetic sections if they are orphans:
ld.lld: warning: :(.symtab) is being placed in '.symtab'
ld.lld: warning: :(.shstrtab) is being placed in '.shstrtab'
ld.lld
On 2020-06-22, Kees Cook wrote:
We don't want to depend on the linker's orphan section placement
heuristics as these can vary between linkers, and may change between
versions. All sections need to be explicitly named in the linker
script.
Add the common debugging sections. Discard the unused
On 2020-06-22, Kees Cook wrote:
For vmlinux linking, no architecture uses the .gnu.version* section,
so remove it via the common DISCARDS macro in preparation for adding
--orphan-handling=warn more widely.
Signed-off-by: Kees Cook
---
include/asm-generic/vmlinux.lds.h | 1 +
1 file changed, 1
But if that gcc was originally
_configured_ with a version of binutils that doesn't support -gz=zlib,
I agree with this theory :)
On 2020-06-10, Arvind Sankar wrote:
On Tue, Jun 09, 2020 at 11:23:31PM -0400, Arvind Sankar wrote:
On Tue, Jun 09, 2020 at 11:12:25PM -0400, Arvind Sankar wrote:
On 2020-06-10, Rong Chen wrote:
On 6/10/20 1:49 AM, Fangrui Song wrote:
On 2020-06-09, Nick Desaulniers wrote:
On Tue, Jun 9, 2020 at 6:12 AM kernel test robot wrote:
tree:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
master
head
On 2020-06-09, Nick Desaulniers wrote:
On Tue, Jun 9, 2020 at 6:12 AM kernel test robot wrote:
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
master
head: abfbb29297c27e3f101f348dc9e467b0fe70f919
commit: 10e68b02c861ccf2b3adb59d3f0c10dc6b5e3ace Makefile: support
On 2020-05-27, Arnd Bergmann wrote:
On Wed, May 27, 2020 at 7:28 PM 'Nick Desaulniers' via Clang Built
Linux wrote:
On Wed, May 27, 2020 at 8:24 AM Mark Rutland wrote:
>
> On Wed, May 27, 2020 at 03:39:46PM +0200, Arnd Bergmann wrote:
> > clang-11 and earlier do not support
On 2020-05-27, 'Nick Desaulniers' via Clang Built Linux wrote:
On Wed, May 27, 2020 at 7:14 AM Arnd Bergmann wrote:
clang and gas seem to interpret the symbols in memmove.S and
memset.S differently, such that clang does not make them
'weak' as expected, which leads to a linker error, with
On 2020-05-26, Arvind Sankar wrote:
On Tue, May 26, 2020 at 08:11:56AM +0200, Ard Biesheuvel wrote:
On Tue, 26 May 2020 at 00:59, Arvind Sankar wrote:
> # Compressed kernel should be built as PIE since it may be loaded at any
> # address by the bootloader.
> -KBUILD_LDFLAGS += $(call
arch/x86/boot/compressed/mkpiggy.c | 6 ++
arch/x86/boot/compressed/vmlinux.lds.S | 11 +++
arch/x86/boot/setup.ld | 2 +-
6 files changed, 109 insertions(+), 104 deletions(-)
--
2.26.2
All 4 commits look good.
Reviewed-by: Fangrui Song
On 2020-05-25, Ard Biesheuvel wrote:
On Sun, 24 May 2020 at 23:28, Arvind Sankar wrote:
Add a linker script check that there are no runtime relocations, and
remove the old one that tries to check via looking for specially-named
sections in the object files.
Drop the tests for -fPIE compiler
On 2020-05-24, Arvind Sankar wrote:
On Sun, May 24, 2020 at 03:53:59PM -0700, Fangrui Song wrote:
On 2020-05-24, Arvind Sankar wrote:
>The assembly code in head_{32,64}.S, while meant to be
>position-independent, generates run-time relocations because it uses
>instructions such as
On 2020-05-24, Arvind Sankar wrote:
On Sun, May 24, 2020 at 03:13:26PM -0700, Fangrui Song wrote:
On 2020-05-24, Arvind Sankar wrote:
>gcc puts the main function into .text.startup when compiled with -Os (or
>-O2). This results in arch/x86/boot/main.c having a .text.startup
>sect
tions is
called *.rel.local* ...
(it probably wanted to name .rel.data.rel.ro or .rel.data)
Reviewed-by: Fangrui Song
This commit fixing https://sourceware.org/bugzilla/show_bug.cgi?id=25754
also fixed the bug. (Just verified that both 2.24 and 2.34 have the bug.
binutils-gdb HEAD (future 2.35) is good.)
% cat a.s
pushl $z_input_len
% cat b.s
.globl z_input_len
z_input_len = 0xb612
% gcc -m32 -c a.s b.s
% ld.bfd -m elf_i386 -pie a.o b.o # has an incorrect R_386_RELATIVE before
binutils 2.35
Reviewed-by: Fangrui Song
On 2020-05-24, Arvind Sankar wrote:
The assembly code in head_{32,64}.S, while meant to be
position-independent, generates run-time relocations because it uses
instructions such as
lealgdt(%edx), %eax
which make the assembler and linker think that the code is using %edx as
an index
ress range overlaps with
.entrytext
>>> .bsdata range is [0x1FF, 0x398]
>>> .entrytext range is [0x26C, 0x2D3]
Explicitly pull .text.startup into the .text output section to avoid
this.
[1] https://reviews.llvm.org/D75225
Signed-off-by: Arvind Sankar
Reviewed-by: Fangrui Song
The following commit has been merged into the x86/build branch of tip:
Commit-ID: d6ee6529436a15a0541aff6e1697989ee7dc2c44
Gitweb:
https://git.kernel.org/tip/d6ee6529436a15a0541aff6e1697989ee7dc2c44
Author:Fangrui Song
AuthorDate:Wed, 20 May 2020 11:20:10 -07:00
Committer
)
It was intended to match GNU ld.
But yes, orphan section placement is still different in the two linkers.
Placing .text.startup before .text seems good.
In GNU ld's internal linker script (ld --verbose),
.text.startup is placed before .text
Reviewed-by: Fangrui Song
On 2020-05-16, Dmitry Golovin wrote:
15.05.2020, 21:50, "Borislav Petkov" :
I need more info here about which segment is read-only?
Is this something LLD does by default or what's happening?
Probably should have quoted the original error message:
ld.lld: error: can't create dynamic
object files along with the linked output should be fine. It
can save disk space. (It'd be great if you paste the comparison
with and w/o object files compressed)
Feel free to add:
Reviewed-by: Fangrui Song
I have a patch series that enables dwarf5 support in the kernel that
I'm working up
On 2020-05-06, Nick Desaulniers wrote:
On Wed, May 6, 2020 at 8:46 AM 'Fangrui Song' via Clang Built Linux
wrote:
Created https://reviews.llvm.org/D79495 to allow the function attribute
'patchable_function_entry' on aarch64_be.
I think -fpatchable-function-entry= just works.
Note, LLD does
On 2020-05-06, Nathan Chancellor wrote:
On Wed, May 06, 2020 at 12:22:58PM +0200, Arnd Bergmann wrote:
On Wed, May 6, 2020 at 5:45 AM Nathan Chancellor
wrote:
> On Tue, May 05, 2020 at 07:42:43PM +0200, Torsten Duwe wrote:
> > On Tue, 5 May 2020 15:25:56 +0100 Mark Rutland wrote:
> > > On
On 2020-05-04, Sedat Dilek wrote:
On Mon, May 4, 2020 at 5:13 AM Nick Desaulniers
wrote:
As debug information gets larger and larger, it helps significantly save
the size of vmlinux images to compress the information in the debug
information sections. Note: this debug info is typically
On 2020-04-28, Nathan Chancellor wrote:
Currently, the VDSO is being linked through $(CC). This does not match
how the rest of the kernel links objects, which is through the $(LD)
variable.
When clang is built in a default configuration, it first attempts to use
the target triple's default
96 matches
Mail list logo