diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2018-02-10 09:25:04 -0500 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-03-25 13:01:19 -0400 |
commit | f49821ee32b76b1a356fab17316eb62430182ecf (patch) | |
tree | 289c979dcb971c009d3c858851af50a55be8a3e4 | |
parent | 6358d6e8b9846c2ff6fd1d4ad2809145635dd813 (diff) |
kbuild: rename built-in.o to built-in.a
Incremental linking is gone, so rename built-in.o to built-in.a, which
is the usual extension for archive files.
This patch does two things, first is a simple search/replace:
git grep -l 'built-in\.o' | xargs sed -i 's/built-in\.o/built-in\.a/g'
The second is to invert nesting of nested text manipulations to avoid
filtering built-in.a out from libs-y2:
-libs-y2 := $(filter-out %.a, $(patsubst %/, %/built-in.a, $(libs-y)))
+libs-y2 := $(patsubst %/, %/built-in.a, $(filter-out %.a, $(libs-y)))
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r-- | Documentation/kbuild/makefiles.txt | 16 | ||||
-rw-r--r-- | Documentation/process/changes.rst | 2 | ||||
-rw-r--r-- | Makefile | 14 | ||||
-rw-r--r-- | arch/blackfin/kernel/bfin_ksyms.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/Makefile | 2 | ||||
-rw-r--r-- | drivers/s390/Makefile | 2 | ||||
-rw-r--r-- | lib/Kconfig.debug | 4 | ||||
-rw-r--r-- | scripts/Makefile.build | 10 | ||||
-rw-r--r-- | scripts/Makefile.lib | 6 | ||||
-rwxr-xr-x | scripts/link-vmlinux.sh | 20 | ||||
-rwxr-xr-x | scripts/namespace.pl | 2 | ||||
-rw-r--r-- | usr/initramfs_data.S | 2 |
12 files changed, 41 insertions, 41 deletions
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 750aea9edd35..667cd899ada8 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
@@ -153,18 +153,18 @@ more details, with real examples. | |||
153 | configuration. | 153 | configuration. |
154 | 154 | ||
155 | Kbuild compiles all the $(obj-y) files. It then calls | 155 | Kbuild compiles all the $(obj-y) files. It then calls |
156 | "$(AR) rcSTP" to merge these files into one built-in.o file. | 156 | "$(AR) rcSTP" to merge these files into one built-in.a file. |
157 | This is a thin archive without a symbol table, which makes it | 157 | This is a thin archive without a symbol table, which makes it |
158 | unsuitable as a linker input. | 158 | unsuitable as a linker input. |
159 | 159 | ||
160 | The scripts/link-vmlinux.sh script later makes an aggregate | 160 | The scripts/link-vmlinux.sh script later makes an aggregate |
161 | built-in.o with "${AR} rcsTP", which creates the thin archive | 161 | built-in.a with "${AR} rcsTP", which creates the thin archive |
162 | with a symbol table and an index, making it a valid input for | 162 | with a symbol table and an index, making it a valid input for |
163 | the final vmlinux link passes. | 163 | the final vmlinux link passes. |
164 | 164 | ||
165 | The order of files in $(obj-y) is significant. Duplicates in | 165 | The order of files in $(obj-y) is significant. Duplicates in |
166 | the lists are allowed: the first instance will be linked into | 166 | the lists are allowed: the first instance will be linked into |
167 | built-in.o and succeeding instances will be ignored. | 167 | built-in.a and succeeding instances will be ignored. |
168 | 168 | ||
169 | Link order is significant, because certain functions | 169 | Link order is significant, because certain functions |
170 | (module_init() / __initcall) will be called during boot in the | 170 | (module_init() / __initcall) will be called during boot in the |
@@ -228,7 +228,7 @@ more details, with real examples. | |||
228 | Note: Of course, when you are building objects into the kernel, | 228 | Note: Of course, when you are building objects into the kernel, |
229 | the syntax above will also work. So, if you have CONFIG_EXT2_FS=y, | 229 | the syntax above will also work. So, if you have CONFIG_EXT2_FS=y, |
230 | kbuild will build an ext2.o file for you out of the individual | 230 | kbuild will build an ext2.o file for you out of the individual |
231 | parts and then link this into built-in.o, as you would expect. | 231 | parts and then link this into built-in.a, as you would expect. |
232 | 232 | ||
233 | --- 3.4 Objects which export symbols | 233 | --- 3.4 Objects which export symbols |
234 | 234 | ||
@@ -238,7 +238,7 @@ more details, with real examples. | |||
238 | --- 3.5 Library file goals - lib-y | 238 | --- 3.5 Library file goals - lib-y |
239 | 239 | ||
240 | Objects listed with obj-* are used for modules, or | 240 | Objects listed with obj-* are used for modules, or |
241 | combined in a built-in.o for that specific directory. | 241 | combined in a built-in.a for that specific directory. |
242 | There is also the possibility to list objects that will | 242 | There is also the possibility to list objects that will |
243 | be included in a library, lib.a. | 243 | be included in a library, lib.a. |
244 | All objects listed with lib-y are combined in a single | 244 | All objects listed with lib-y are combined in a single |
@@ -250,7 +250,7 @@ more details, with real examples. | |||
250 | 250 | ||
251 | Note that the same kbuild makefile may list files to be built-in | 251 | Note that the same kbuild makefile may list files to be built-in |
252 | and to be part of a library. Therefore the same directory | 252 | and to be part of a library. Therefore the same directory |
253 | may contain both a built-in.o and a lib.a file. | 253 | may contain both a built-in.a and a lib.a file. |
254 | 254 | ||
255 | Example: | 255 | Example: |
256 | #arch/x86/lib/Makefile | 256 | #arch/x86/lib/Makefile |
@@ -992,7 +992,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
992 | 992 | ||
993 | $(head-y) lists objects to be linked first in vmlinux. | 993 | $(head-y) lists objects to be linked first in vmlinux. |
994 | $(libs-y) lists directories where a lib.a archive can be located. | 994 | $(libs-y) lists directories where a lib.a archive can be located. |
995 | The rest list directories where a built-in.o object file can be | 995 | The rest list directories where a built-in.a object file can be |
996 | located. | 996 | located. |
997 | 997 | ||
998 | $(init-y) objects will be located after $(head-y). | 998 | $(init-y) objects will be located after $(head-y). |
@@ -1077,7 +1077,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
1077 | extra-y := head.o init_task.o | 1077 | extra-y := head.o init_task.o |
1078 | 1078 | ||
1079 | In this example, extra-y is used to list object files that | 1079 | In this example, extra-y is used to list object files that |
1080 | shall be built, but shall not be linked as part of built-in.o. | 1080 | shall be built, but shall not be linked as part of built-in.a. |
1081 | 1081 | ||
1082 | 1082 | ||
1083 | --- 6.7 Commands useful for building a boot image | 1083 | --- 6.7 Commands useful for building a boot image |
diff --git a/Documentation/process/changes.rst b/Documentation/process/changes.rst index 81cdb528ad46..4f19a9725f76 100644 --- a/Documentation/process/changes.rst +++ b/Documentation/process/changes.rst | |||
@@ -78,7 +78,7 @@ Binutils | |||
78 | -------- | 78 | -------- |
79 | 79 | ||
80 | The build system has, as of 4.13, switched to using thin archives (`ar T`) | 80 | The build system has, as of 4.13, switched to using thin archives (`ar T`) |
81 | rather than incremental linking (`ld -r`) for built-in.o intermediate steps. | 81 | rather than incremental linking (`ld -r`) for built-in.a intermediate steps. |
82 | This requires binutils 2.20 or newer. | 82 | This requires binutils 2.20 or newer. |
83 | 83 | ||
84 | Flex | 84 | Flex |
@@ -35,7 +35,7 @@ unexport GREP_OPTIONS | |||
35 | # Most importantly: sub-Makefiles should only ever modify files in | 35 | # Most importantly: sub-Makefiles should only ever modify files in |
36 | # their own directory. If in some directory we have a dependency on | 36 | # their own directory. If in some directory we have a dependency on |
37 | # a file in another dir (which doesn't happen often, but it's often | 37 | # a file in another dir (which doesn't happen often, but it's often |
38 | # unavoidable when linking the built-in.o targets which finally | 38 | # unavoidable when linking the built-in.a targets which finally |
39 | # turn into vmlinux), we will call a sub make in that other dir, and | 39 | # turn into vmlinux), we will call a sub make in that other dir, and |
40 | # after that we are sure that everything which is in that other dir | 40 | # after that we are sure that everything which is in that other dir |
41 | # is now up to date. | 41 | # is now up to date. |
@@ -982,13 +982,13 @@ vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ | |||
982 | vmlinux-alldirs := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \ | 982 | vmlinux-alldirs := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \ |
983 | $(init-) $(core-) $(drivers-) $(net-) $(libs-) $(virt-)))) | 983 | $(init-) $(core-) $(drivers-) $(net-) $(libs-) $(virt-)))) |
984 | 984 | ||
985 | init-y := $(patsubst %/, %/built-in.o, $(init-y)) | 985 | init-y := $(patsubst %/, %/built-in.a, $(init-y)) |
986 | core-y := $(patsubst %/, %/built-in.o, $(core-y)) | 986 | core-y := $(patsubst %/, %/built-in.a, $(core-y)) |
987 | drivers-y := $(patsubst %/, %/built-in.o, $(drivers-y)) | 987 | drivers-y := $(patsubst %/, %/built-in.a, $(drivers-y)) |
988 | net-y := $(patsubst %/, %/built-in.o, $(net-y)) | 988 | net-y := $(patsubst %/, %/built-in.a, $(net-y)) |
989 | libs-y1 := $(patsubst %/, %/lib.a, $(libs-y)) | 989 | libs-y1 := $(patsubst %/, %/lib.a, $(libs-y)) |
990 | libs-y2 := $(filter-out %.a, $(patsubst %/, %/built-in.o, $(libs-y))) | 990 | libs-y2 := $(patsubst %/, %/built-in.a, $(filter-out %.a, $(libs-y))) |
991 | virt-y := $(patsubst %/, %/built-in.o, $(virt-y)) | 991 | virt-y := $(patsubst %/, %/built-in.a, $(virt-y)) |
992 | 992 | ||
993 | # Externally visible symbols (used by link-vmlinux.sh) | 993 | # Externally visible symbols (used by link-vmlinux.sh) |
994 | export KBUILD_VMLINUX_INIT := $(head-y) $(init-y) | 994 | export KBUILD_VMLINUX_INIT := $(head-y) $(init-y) |
diff --git a/arch/blackfin/kernel/bfin_ksyms.c b/arch/blackfin/kernel/bfin_ksyms.c index 68096e8f787f..c0038eeb9e29 100644 --- a/arch/blackfin/kernel/bfin_ksyms.c +++ b/arch/blackfin/kernel/bfin_ksyms.c | |||
@@ -36,7 +36,7 @@ EXPORT_SYMBOL(memchr); | |||
36 | /* | 36 | /* |
37 | * Because string functions are both inline and exported functions and | 37 | * Because string functions are both inline and exported functions and |
38 | * folder arch/blackfin/lib is configured as a library path in Makefile, | 38 | * folder arch/blackfin/lib is configured as a library path in Makefile, |
39 | * symbols exported in folder lib is not linked into built-in.o but | 39 | * symbols exported in folder lib is not linked into built-in.a but |
40 | * inlined only. In order to export string symbols to kernel module | 40 | * inlined only. In order to export string symbols to kernel module |
41 | * properly, they should be exported here. | 41 | * properly, they should be exported here. |
42 | */ | 42 | */ |
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 1b6bc7fba996..2358f97d62ec 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -165,7 +165,7 @@ systbl_chk: $(src)/systbl_chk.sh $(obj)/systbl_chk.i | |||
165 | $(call cmd,systbl_chk) | 165 | $(call cmd,systbl_chk) |
166 | 166 | ||
167 | ifeq ($(CONFIG_PPC_OF_BOOT_TRAMPOLINE),y) | 167 | ifeq ($(CONFIG_PPC_OF_BOOT_TRAMPOLINE),y) |
168 | $(obj)/built-in.o: prom_init_check | 168 | $(obj)/built-in.a: prom_init_check |
169 | 169 | ||
170 | quiet_cmd_prom_init_check = CALL $< | 170 | quiet_cmd_prom_init_check = CALL $< |
171 | cmd_prom_init_check = $(CONFIG_SHELL) $< "$(NM)" "$(obj)/prom_init.o" | 171 | cmd_prom_init_check = $(CONFIG_SHELL) $< "$(NM)" "$(obj)/prom_init.o" |
diff --git a/drivers/s390/Makefile b/drivers/s390/Makefile index 2fdab400c1fe..a863b0462b43 100644 --- a/drivers/s390/Makefile +++ b/drivers/s390/Makefile | |||
@@ -5,5 +5,5 @@ | |||
5 | 5 | ||
6 | obj-y += cio/ block/ char/ crypto/ net/ scsi/ virtio/ | 6 | obj-y += cio/ block/ char/ crypto/ net/ scsi/ virtio/ |
7 | 7 | ||
8 | drivers-y += drivers/s390/built-in.o | 8 | drivers-y += drivers/s390/built-in.a |
9 | 9 | ||
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 64155e310a9f..5be22e406f96 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -324,11 +324,11 @@ config DEBUG_SECTION_MISMATCH | |||
324 | the analysis would not catch the illegal reference. | 324 | the analysis would not catch the illegal reference. |
325 | This option tells gcc to inline less (but it does result in | 325 | This option tells gcc to inline less (but it does result in |
326 | a larger kernel). | 326 | a larger kernel). |
327 | - Run the section mismatch analysis for each module/built-in.o file. | 327 | - Run the section mismatch analysis for each module/built-in.a file. |
328 | When we run the section mismatch analysis on vmlinux.o, we | 328 | When we run the section mismatch analysis on vmlinux.o, we |
329 | lose valuable information about where the mismatch was | 329 | lose valuable information about where the mismatch was |
330 | introduced. | 330 | introduced. |
331 | Running the analysis for each module/built-in.o file | 331 | Running the analysis for each module/built-in.a file |
332 | tells where the mismatch happens much closer to the | 332 | tells where the mismatch happens much closer to the |
333 | source. The drawback is that the same mismatch is | 333 | source. The drawback is that the same mismatch is |
334 | reported at least twice. | 334 | reported at least twice. |
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 672cf5bfd724..7cd2f4a6c2ac 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -77,7 +77,7 @@ obj-y += $(obj)/lib-ksyms.o | |||
77 | endif | 77 | endif |
78 | 78 | ||
79 | ifneq ($(strip $(obj-y) $(need-builtin)),) | 79 | ifneq ($(strip $(obj-y) $(need-builtin)),) |
80 | builtin-target := $(obj)/built-in.o | 80 | builtin-target := $(obj)/built-in.a |
81 | endif | 81 | endif |
82 | 82 | ||
83 | modorder-target := $(obj)/modules.order | 83 | modorder-target := $(obj)/modules.order |
@@ -104,7 +104,7 @@ ifneq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),) | |||
104 | cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $< ; | 104 | cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $< ; |
105 | endif | 105 | endif |
106 | 106 | ||
107 | # Do section mismatch analysis for each module/built-in.o | 107 | # Do section mismatch analysis for each module/built-in.a |
108 | ifdef CONFIG_DEBUG_SECTION_MISMATCH | 108 | ifdef CONFIG_DEBUG_SECTION_MISMATCH |
109 | cmd_secanalysis = ; scripts/mod/modpost $@ | 109 | cmd_secanalysis = ; scripts/mod/modpost $@ |
110 | endif | 110 | endif |
@@ -458,15 +458,15 @@ $(sort $(subdir-obj-y)): $(subdir-ym) ; | |||
458 | # | 458 | # |
459 | ifdef builtin-target | 459 | ifdef builtin-target |
460 | 460 | ||
461 | # built-in.o archives are made with no symbol table or index which | 461 | # built-in.a archives are made with no symbol table or index which |
462 | # makes them small and fast, but unable to be used by the linker. | 462 | # makes them small and fast, but unable to be used by the linker. |
463 | # scripts/link-vmlinux.sh builds an aggregate built-in.o with a symbol | 463 | # scripts/link-vmlinux.sh builds an aggregate built-in.a with a symbol |
464 | # table and index. | 464 | # table and index. |
465 | cmd_make_builtin = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) | 465 | cmd_make_builtin = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) |
466 | cmd_make_empty_builtin = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) | 466 | cmd_make_empty_builtin = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) |
467 | quiet_cmd_link_o_target = AR $@ | 467 | quiet_cmd_link_o_target = AR $@ |
468 | 468 | ||
469 | # If the list of objects to link is empty, just create an empty built-in.o | 469 | # If the list of objects to link is empty, just create an empty built-in.a |
470 | cmd_link_o_target = $(if $(strip $(obj-y)),\ | 470 | cmd_link_o_target = $(if $(strip $(obj-y)),\ |
471 | $(cmd_make_builtin) $@ $(filter $(obj-y), $^) \ | 471 | $(cmd_make_builtin) $@ $(filter $(obj-y), $^) \ |
472 | $(cmd_secanalysis),\ | 472 | $(cmd_secanalysis),\ |
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index a6f538b31ad6..5fd60af76d98 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
@@ -27,7 +27,7 @@ modorder := $(patsubst %/,%/modules.order, $(filter %/, $(obj-y)) $(obj-m:.o=.ko | |||
27 | 27 | ||
28 | # Handle objects in subdirs | 28 | # Handle objects in subdirs |
29 | # --------------------------------------------------------------------------- | 29 | # --------------------------------------------------------------------------- |
30 | # o if we encounter foo/ in $(obj-y), replace it by foo/built-in.o | 30 | # o if we encounter foo/ in $(obj-y), replace it by foo/built-in.a |
31 | # and add the directory to the list of dirs to descend into: $(subdir-y) | 31 | # and add the directory to the list of dirs to descend into: $(subdir-y) |
32 | # o if we encounter foo/ in $(obj-m), remove it from $(obj-m) | 32 | # o if we encounter foo/ in $(obj-m), remove it from $(obj-m) |
33 | # and add the directory to the list of dirs to descend into: $(subdir-m) | 33 | # and add the directory to the list of dirs to descend into: $(subdir-m) |
@@ -35,7 +35,7 @@ __subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y))) | |||
35 | subdir-y += $(__subdir-y) | 35 | subdir-y += $(__subdir-y) |
36 | __subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m))) | 36 | __subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m))) |
37 | subdir-m += $(__subdir-m) | 37 | subdir-m += $(__subdir-m) |
38 | obj-y := $(patsubst %/, %/built-in.o, $(obj-y)) | 38 | obj-y := $(patsubst %/, %/built-in.a, $(obj-y)) |
39 | obj-m := $(filter-out %/, $(obj-m)) | 39 | obj-m := $(filter-out %/, $(obj-m)) |
40 | 40 | ||
41 | # Subdirectories we need to descend into | 41 | # Subdirectories we need to descend into |
@@ -54,7 +54,7 @@ multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y))) | |||
54 | 54 | ||
55 | # $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to | 55 | # $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to |
56 | # tell kbuild to descend | 56 | # tell kbuild to descend |
57 | subdir-obj-y := $(filter %/built-in.o, $(obj-y)) | 57 | subdir-obj-y := $(filter %/built-in.a, $(obj-y)) |
58 | 58 | ||
59 | # Replace multi-part objects by their individual parts, look at local dir only | 59 | # Replace multi-part objects by their individual parts, look at local dir only |
60 | real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) | 60 | real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) |
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 601ca8b528b3..08ca08e9105c 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh | |||
@@ -4,7 +4,7 @@ | |||
4 | # link vmlinux | 4 | # link vmlinux |
5 | # | 5 | # |
6 | # vmlinux is linked from the objects selected by $(KBUILD_VMLINUX_INIT) and | 6 | # vmlinux is linked from the objects selected by $(KBUILD_VMLINUX_INIT) and |
7 | # $(KBUILD_VMLINUX_MAIN) and $(KBUILD_VMLINUX_LIBS). Most are built-in.o files | 7 | # $(KBUILD_VMLINUX_MAIN) and $(KBUILD_VMLINUX_LIBS). Most are built-in.a files |
8 | # from top-level directories in the kernel tree, others are specified in | 8 | # from top-level directories in the kernel tree, others are specified in |
9 | # arch/$(ARCH)/Makefile. Ordering when linking is important, and | 9 | # arch/$(ARCH)/Makefile. Ordering when linking is important, and |
10 | # $(KBUILD_VMLINUX_INIT) must be first. $(KBUILD_VMLINUX_LIBS) are archives | 10 | # $(KBUILD_VMLINUX_INIT) must be first. $(KBUILD_VMLINUX_LIBS) are archives |
@@ -18,7 +18,7 @@ | |||
18 | # | +--< init/version.o + more | 18 | # | +--< init/version.o + more |
19 | # | | 19 | # | |
20 | # +--< $(KBUILD_VMLINUX_MAIN) | 20 | # +--< $(KBUILD_VMLINUX_MAIN) |
21 | # | +--< drivers/built-in.o mm/built-in.o + more | 21 | # | +--< drivers/built-in.a mm/built-in.a + more |
22 | # | | 22 | # | |
23 | # +--< $(KBUILD_VMLINUX_LIBS) | 23 | # +--< $(KBUILD_VMLINUX_LIBS) |
24 | # | +--< lib/lib.a + more | 24 | # | +--< lib/lib.a + more |
@@ -51,13 +51,13 @@ info() | |||
51 | # | 51 | # |
52 | # Traditional incremental style of link does not require this step | 52 | # Traditional incremental style of link does not require this step |
53 | # | 53 | # |
54 | # built-in.o output file | 54 | # built-in.a output file |
55 | # | 55 | # |
56 | archive_builtin() | 56 | archive_builtin() |
57 | { | 57 | { |
58 | info AR built-in.o | 58 | info AR built-in.a |
59 | rm -f built-in.o; | 59 | rm -f built-in.a; |
60 | ${AR} rcsTP${KBUILD_ARFLAGS} built-in.o \ | 60 | ${AR} rcsTP${KBUILD_ARFLAGS} built-in.a \ |
61 | ${KBUILD_VMLINUX_INIT} \ | 61 | ${KBUILD_VMLINUX_INIT} \ |
62 | ${KBUILD_VMLINUX_MAIN} | 62 | ${KBUILD_VMLINUX_MAIN} |
63 | } | 63 | } |
@@ -69,7 +69,7 @@ modpost_link() | |||
69 | local objects | 69 | local objects |
70 | 70 | ||
71 | objects="--whole-archive \ | 71 | objects="--whole-archive \ |
72 | built-in.o \ | 72 | built-in.a \ |
73 | --no-whole-archive \ | 73 | --no-whole-archive \ |
74 | --start-group \ | 74 | --start-group \ |
75 | ${KBUILD_VMLINUX_LIBS} \ | 75 | ${KBUILD_VMLINUX_LIBS} \ |
@@ -88,7 +88,7 @@ vmlinux_link() | |||
88 | 88 | ||
89 | if [ "${SRCARCH}" != "um" ]; then | 89 | if [ "${SRCARCH}" != "um" ]; then |
90 | objects="--whole-archive \ | 90 | objects="--whole-archive \ |
91 | built-in.o \ | 91 | built-in.a \ |
92 | --no-whole-archive \ | 92 | --no-whole-archive \ |
93 | --start-group \ | 93 | --start-group \ |
94 | ${KBUILD_VMLINUX_LIBS} \ | 94 | ${KBUILD_VMLINUX_LIBS} \ |
@@ -99,7 +99,7 @@ vmlinux_link() | |||
99 | -T ${lds} ${objects} | 99 | -T ${lds} ${objects} |
100 | else | 100 | else |
101 | objects="-Wl,--whole-archive \ | 101 | objects="-Wl,--whole-archive \ |
102 | built-in.o \ | 102 | built-in.a \ |
103 | -Wl,--no-whole-archive \ | 103 | -Wl,--no-whole-archive \ |
104 | -Wl,--start-group \ | 104 | -Wl,--start-group \ |
105 | ${KBUILD_VMLINUX_LIBS} \ | 105 | ${KBUILD_VMLINUX_LIBS} \ |
@@ -164,7 +164,7 @@ cleanup() | |||
164 | rm -f .tmp_System.map | 164 | rm -f .tmp_System.map |
165 | rm -f .tmp_kallsyms* | 165 | rm -f .tmp_kallsyms* |
166 | rm -f .tmp_vmlinux* | 166 | rm -f .tmp_vmlinux* |
167 | rm -f built-in.o | 167 | rm -f built-in.a |
168 | rm -f System.map | 168 | rm -f System.map |
169 | rm -f vmlinux | 169 | rm -f vmlinux |
170 | rm -f vmlinux.o | 170 | rm -f vmlinux.o |
diff --git a/scripts/namespace.pl b/scripts/namespace.pl index 729c547fc9e1..6135574a6f39 100755 --- a/scripts/namespace.pl +++ b/scripts/namespace.pl | |||
@@ -164,7 +164,7 @@ sub linux_objects | |||
164 | s:^\./::; | 164 | s:^\./::; |
165 | if (/.*\.o$/ && | 165 | if (/.*\.o$/ && |
166 | ! ( | 166 | ! ( |
167 | m:/built-in.o$: | 167 | m:/built-in.a$: |
168 | || m:arch/x86/vdso/: | 168 | || m:arch/x86/vdso/: |
169 | || m:arch/x86/boot/: | 169 | || m:arch/x86/boot/: |
170 | || m:arch/ia64/ia32/ia32.o$: | 170 | || m:arch/ia64/ia32/ia32.o$: |
diff --git a/usr/initramfs_data.S b/usr/initramfs_data.S index 10d325e24566..b28da799f6a6 100644 --- a/usr/initramfs_data.S +++ b/usr/initramfs_data.S | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | ld -m elf_i386 --format binary --oformat elf32-i386 -r \ | 11 | ld -m elf_i386 --format binary --oformat elf32-i386 -r \ |
12 | -T initramfs_data.scr initramfs_data.cpio.gz -o initramfs_data.o | 12 | -T initramfs_data.scr initramfs_data.cpio.gz -o initramfs_data.o |
13 | ld -m elf_i386 -r -o built-in.o initramfs_data.o | 13 | ld -m elf_i386 -r -o built-in.a initramfs_data.o |
14 | 14 | ||
15 | For including the .init.ramfs sections, see include/asm-generic/vmlinux.lds. | 15 | For including the .init.ramfs sections, see include/asm-generic/vmlinux.lds. |
16 | 16 | ||