Skip to content
Commit 1840901a authored by George Rimar's avatar George Rimar
Browse files

[ELF] - Allow producing -r output if only empty archive is given.

This is used by linux kernel build system.

(https://www.kernel.org/doc/Documentation/kbuild/makefiles.txt "3.2 Built-in object goals")

It has for example next configuration for linking built-in.o files:
drivers-y	:= $(patsubst %/, %/built-in.o, $(drivers-y))
drivers-$(CONFIG_PCI)		+= arch/ia64/pci/
...
drivers-$(CONFIG_OPROFILE)	+= arch/ia64/oprofile/

Im most simple case all CONFIG_* options are off. That means linker is called with empty input archive, 
emulation option and no inputs and expected to generate some relocatable output. 
ld.bfd is able to do that, we dont.

Patch allows to support this case.

Differential revision: https://reviews.llvm.org/D33937

llvm-svn: 305069
parent de57795c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment