acrn-kernel/arch/nios2/kernel
Masahiro Yamada 3216484550 kbuild: use obj-y instead extra-y for objects placed at the head
The objects placed at the head of vmlinux need special treatments:

 - arch/$(SRCARCH)/Makefile adds them to head-y in order to place
   them before other archives in the linker command line.

 - arch/$(SRCARCH)/kernel/Makefile adds them to extra-y instead of
   obj-y to avoid them going into built-in.a.

This commit gets rid of the latter.

Create vmlinux.a to collect all the objects that are unconditionally
linked to vmlinux. The objects listed in head-y are moved to the head
of vmlinux.a by using 'ar m'.

With this, arch/$(SRCARCH)/kernel/Makefile can consistently use obj-y
for builtin objects.

There is no *.o that is directly linked to vmlinux. Drop unneeded code
in scripts/clang-tools/gen_compile_commands.py.

$(AR) mPi needs 'T' to workaround the llvm-ar bug. The fix was suggested
by Nathan Chancellor [1].

[1]: https://lore.kernel.org/llvm/YyjjT5gQ2hGMH0ni@dev-arch.thelio-3990X/

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
2022-10-02 18:04:05 +09:00
..
.gitignore
Makefile kbuild: use obj-y instead extra-y for objects placed at the head 2022-10-02 18:04:05 +09:00
asm-offsets.c
cpuinfo.c
entry.S nios2: add force_successful_syscall_return() 2022-08-15 11:25:32 -05:00
head.S
insnemu.S
irq.c nios2: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:41 +01:00
kgdb.c
misaligned.c
module.c
nios2_ksyms.c
process.c fork: Generalize PF_IO_WORKER handling 2022-05-07 09:01:59 -05:00
prom.c
ptrace.c ptrace: Create ptrace_report_syscall_{entry,exit} in ptrace.h 2022-03-10 13:35:08 -06:00
setup.c NIOS2: setup.c: drop unused variable 'dram_start' 2021-09-27 08:34:54 -05:00
signal.c nios2: restarts apply only to the first sigframe we build... 2022-08-15 11:25:32 -05:00
sys_nios2.c Take mmap lock in cacheflush syscall 2021-02-19 15:01:59 +08:00
syscall_table.c nios2: don't leave NULLs in sys_call_table[] 2022-08-15 11:25:32 -05:00
time.c
traps.c exit: Add and use make_task_dead. 2021-12-13 12:04:45 -06:00
vmlinux.lds.S