Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
b60b198f
Commit
b60b198f
authored
Oct 05, 2002
by
Kai Germaschewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cset exclude: kai@tp1.ruhr-uni-bochum.de|ChangeSet|20021005215705|12351
parent
1815a7a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
39 deletions
+23
-39
Makefile
Makefile
+22
-37
arch/i386/vmlinux.lds.S
arch/i386/vmlinux.lds.S
+1
-2
No files found.
Makefile
View file @
b60b198f
...
@@ -285,8 +285,8 @@ export MODLIB
...
@@ -285,8 +285,8 @@ export MODLIB
vmlinux-objs
:=
$(HEAD)
$
(
init-y
)
$
(
core-y
)
$
(
libs-y
)
$
(
drivers-y
)
$
(
net-y
)
vmlinux-objs
:=
$(HEAD)
$
(
init-y
)
$
(
core-y
)
$
(
libs-y
)
$
(
drivers-y
)
$
(
net-y
)
quiet_cmd_l
d_tmp
_vmlinux
=
LD
$@
quiet_cmd_l
ink
_vmlinux
=
LD
$@
define
cmd_l
d_tmp
_vmlinux
define
cmd_l
ink
_vmlinux
$(LD)
$(LDFLAGS)
$(LDFLAGS_vmlinux)
$(HEAD)
$(init-y)
\
$(LD)
$(LDFLAGS)
$(LDFLAGS_vmlinux)
$(HEAD)
$(init-y)
\
--start-group
\
--start-group
\
$(core-y)
\
$(core-y)
\
...
@@ -294,19 +294,21 @@ define cmd_ld_tmp_vmlinux
...
@@ -294,19 +294,21 @@ define cmd_ld_tmp_vmlinux
$(drivers-y)
\
$(drivers-y)
\
$(net-y)
\
$(net-y)
\
--end-group
\
--end-group
\
$(filter
$(kallsyms.o),$^)
\
-o
$@
-o
$@
endef
endef
# set -e makes the rule exit immediately on error
# set -e makes the rule exit immediately on error
define
rule_
ld_tmp_
vmlinux
define
rule_vmlinux
set
-e
set
-e
echo
' Generating build number'
echo
' Generating build number'
.
scripts/mkversion
>
.tmp_version
.
scripts/mkversion
>
.tmp_version
mv
-f
.tmp_version
.version
mv
-f
.tmp_version
.version
+$(call
descend,init,)
+$(call
descend,init,)
$(call
cmd,ld_tmp_vmlinux)
$(call
cmd,link_vmlinux)
echo 'cmd_$@
:
= $(cmd_ld_tmp_vmlinux)' > $(@D)/.$(@F).cmd
echo 'cmd_$@
:
= $(cmd_link_vmlinux)' > $(@D)/.$(@F).cmd
$(NM)
$@
|
grep
-v
'\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)'
|
sort
>
System.map
endef
endef
LDFLAGS_vmlinux
+=
-T
arch
/
$(ARCH)
/vmlinux.lds.s
LDFLAGS_vmlinux
+=
-T
arch
/
$(ARCH)
/vmlinux.lds.s
...
@@ -325,9 +327,10 @@ LDFLAGS_vmlinux += -T arch/$(ARCH)/vmlinux.lds.s
...
@@ -325,9 +327,10 @@ LDFLAGS_vmlinux += -T arch/$(ARCH)/vmlinux.lds.s
ifdef
CONFIG_KALLSYMS
ifdef
CONFIG_KALLSYMS
final-objs
+
=
.tmp_kallsyms.o
kallsyms.o
:
=
.tmp_kallsyms.o
quiet_cmd_kallsyms
=
KSYM
$@
quiet_cmd_kallsyms
=
KSYM
$@
cmd_kallsyms
=
$(KALLSYMS)
$<
>
$@
cmd_kallsyms
=
\
cmd_kallsyms
=
\
$(KALLSYMS)
$<
>
.tmp_kallsyms1.o
;
\
$(KALLSYMS)
$<
>
.tmp_kallsyms1.o
;
\
$(LD)
$(LDFLAGS)
$(LDFLAGS_vmlinux)
.tmp_vmlinux .tmp_kallsyms1.o
\
$(LD)
$(LDFLAGS)
$(LDFLAGS_vmlinux)
.tmp_vmlinux .tmp_kallsyms1.o
\
...
@@ -338,32 +341,25 @@ cmd_kallsyms = \
...
@@ -338,32 +341,25 @@ cmd_kallsyms = \
.tmp_kallsyms.o
:
.tmp_vmlinux
.tmp_kallsyms.o
:
.tmp_vmlinux
$(
call
cmd,kallsyms
)
$(
call
cmd,kallsyms
)
endif
# After generating .tmp_vmlinux just like vmlinux, decrement the version
# number again, so the final vmlinux gets the same one.
# Ignore return value of 'expr'.
# Link a temporary vmlinux for postprocessing
define
rule_.tmp_vmlinux
# (e.g. kallsyms)
$(rule_vmlinux)
if
expr
0`cat
.version`
-
1
>
.tmp_version;
then
true;
fi
mv
-f
.tmp_version
.version
endef
.tmp_vmlinux
:
$(vmlinux-objs) arch/$(ARCH)/vmlinux.lds.s FORCE
.tmp_vmlinux
:
$(vmlinux-objs) arch/$(ARCH)/vmlinux.lds.s FORCE
$(
call
if_changed_rule,ld_tmp_vmlinux
)
$(
call
if_changed_rule,.tmp_vmlinux
)
# Finally the vmlinux rule
quiet_cmd_ld_vmlinux
=
LD
$(echo_target)
cmd_ld_vmlinux
=
$(LD)
$(LDFLAGS)
$
(
LDFLAGS_
$
(
@F
))
\
$(
filter-out
FORCE,
$^
)
-o
$@
define
rule_ld_vmlinux
endif
set
-e
$(call
cmd,ld_vmlinux)
echo 'cmd_$@
:
= $(cmd_ld_vmlinux)' > $(@D)/.$(@F).cmd
$(NM)
$@
|
grep
-v
'\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)'
|
sort
>
System.map
endef
# Link the actual vmlinux, which is temporary one from above,
# Finally the vmlinux rule
# and possibly additional sections given in $(final-objs)
vmlinux
:
.tmp_vmlinux $(final-objs
) arch/$(ARCH)/vmlinux.lds.s FORCE
vmlinux
:
$(vmlinux-objs) $(kallsyms.o
) arch/$(ARCH)/vmlinux.lds.s FORCE
$(
call
if_changed_rule,
ld_
vmlinux
)
$(
call
if_changed_rule,vmlinux
)
# The actual objects are generated when descending,
# The actual objects are generated when descending,
# make sure no implicit rule kicks in
# make sure no implicit rule kicks in
...
@@ -881,17 +877,6 @@ ifneq ($(cmd_files),)
...
@@ -881,17 +877,6 @@ ifneq ($(cmd_files),)
include
$(cmd_files)
include
$(cmd_files)
endif
endif
# function to only execute the passed command if necessary
if_changed
=
$(
if
$(
strip
$?
\
$(
filter-out
$
(
cmd_
$(1)
)
,
$
(
cmd_
$@
))
\
$(
filter-out
$
(
cmd_
$@
)
,
$
(
cmd_
$(1)
)))
,
\
@set
-e
;
\
$(
if
$
(
$(quiet)
cmd_
$(1)
)
,echo
' $(
$(quiet)
cmd_
$(1)
)
'
;
)
\
$
(
cmd_
$(1)
)
;
\
echo
'cmd_$@ := $(cmd_
$(1)
)
'
>
$
(
@D
)
/.
$
(
@F
)
.cmd
)
# execute the command and also postprocess generated .d dependencies
# execute the command and also postprocess generated .d dependencies
# file
# file
...
...
arch/i386/vmlinux.lds.S
View file @
b60b198f
...
@@ -49,7 +49,6 @@ SECTIONS
...
@@ -49,7 +49,6 @@ SECTIONS
__setup_end
=
.
;
__setup_end
=
.
;
__initcall_start
=
.
;
__initcall_start
=
.
;
.
initcall.init
:
{
.
initcall.init
:
{
*(.
initcall.init
)
*(.
initcall1.init
)
*(.
initcall1.init
)
*(.
initcall2.init
)
*(.
initcall2.init
)
*(.
initcall3.init
)
*(.
initcall3.init
)
...
@@ -73,7 +72,7 @@ SECTIONS
...
@@ -73,7 +72,7 @@ SECTIONS
__nosave_end
=
.
;
__nosave_end
=
.
;
.
=
ALIGN
(
4096
)
;
.
=
ALIGN
(
4096
)
;
.
data.
page_aligned
:
{
*(
.
data
.
page_aligned
)
*(
.
data
.
idt
)
}
.
data.
page_aligned
:
{
*(
.
data
.
idt
)
}
.
=
ALIGN
(
32
)
;
.
=
ALIGN
(
32
)
;
.
data.
cacheline_aligned
:
{
*(
.
data
.
cacheline_aligned
)
}
.
data.
cacheline_aligned
:
{
*(
.
data
.
cacheline_aligned
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment