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
nexedi
linux
Commits
6c5216e2
Commit
6c5216e2
authored
Sep 17, 2002
by
Kai Germaschewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kbuild: Fix up CRIS vmlinux.lds.S
Untested, but at least it should show how to adapt the cris arch.
parent
45c4f39a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
23 deletions
+11
-23
arch/cris/Makefile
arch/cris/Makefile
+7
-21
arch/cris/vmlinux.lds.S
arch/cris/vmlinux.lds.S
+4
-2
No files found.
arch/cris/Makefile
View file @
6c5216e2
...
@@ -10,28 +10,12 @@
...
@@ -10,28 +10,12 @@
# License. See the file "COPYING" in the main directory of this archive
# License. See the file "COPYING" in the main directory of this archive
# for more details.
# for more details.
LD_SCRIPT
=
$(TOPDIR)
/arch/cris/cris.ld
# A bug in ld prevents us from having a (constant-value) symbol in a
# A bug in ld prevents us from having a (constant-value) symbol in a
# "ORIGIN =" or "LENGTH =" expression. We fix that by generating a
# "ORIGIN =" or "LENGTH =" expression.
# linker file with the symbolic part of those expressions evaluated.
# Unfortunately, there is trouble making vmlinux depend on anything we
LD
=
$(CROSS_COMPILE)
ld
-mcrislinux
# generate here, so we *always* regenerate the final linker script and
# replace the LD macro to get what we want. Thankfully(?) vmlinux is
LDFLAGS_vmlinux
=
-T
arch
/
$(ARCH)
/vmlinux.lds.s
# always rebuilt (due to calling make recursively and not knowing if
# anything was rebuilt).
# The shell script to build in some kind of dependency is really not
# necessary for reasons of speed. It's there because always
# regenerating stuff (even for incremental linking of subsystems!) is
# even more nauseating.
LD
=
if
[
!
-e
$(LD_SCRIPT)
.tmp
-o
$(LD_SCRIPT)
-nt
$(LD_SCRIPT)
.tmp
]
;
then
\
sed
-e
s/@CONFIG_ETRAX_DRAM_VIRTUAL_BASE@/0x
$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
/
\
-e
s/@CONFIG_ETRAX_DRAM_SIZE_M@/
$(CONFIG_ETRAX_DRAM_SIZE)
/
\
<
$(LD_SCRIPT)
>
$(LD_SCRIPT)
.tmp
;
\
else
true
;
\
fi
&&
$(CROSS_COMPILE)
ld
-mcrislinux
LDFLAGS_vmlinux
=
-T
$(LD_SCRIPT)
.tmp
# objcopy is used to make binary images from the resulting linked file
# objcopy is used to make binary images from the resulting linked file
...
@@ -63,6 +47,8 @@ LIBS := $(TOPDIR)/arch/cris/lib/lib.a $(LIBS) $(TOPDIR)/arch/cris/lib/lib.a $(LI
...
@@ -63,6 +47,8 @@ LIBS := $(TOPDIR)/arch/cris/lib/lib.a $(LIBS) $(TOPDIR)/arch/cris/lib/lib.a $(LI
MAKEBOOT
=
$(MAKE)
-C
arch
/
$(ARCH)
/boot
MAKEBOOT
=
$(MAKE)
-C
arch
/
$(ARCH)
/boot
vmlinux
:
arch/$(ARCH)/vmlinux.lds.s
vmlinux.bin
:
vmlinux
vmlinux.bin
:
vmlinux
$(OBJCOPY)
$(OBJCOPYFLAGS)
vmlinux vmlinux.bin
$(OBJCOPY)
$(OBJCOPYFLAGS)
vmlinux vmlinux.bin
...
...
arch/cris/
cris.ld
→
arch/cris/
vmlinux.lds.S
View file @
6c5216e2
...
@@ -8,10 +8,12 @@
...
@@ -8,10 +8,12 @@
*
the
kernel
has
booted
.
*
the
kernel
has
booted
.
*/
*/
#include <linux/config.h>
jiffies
=
jiffies_64
;
jiffies
=
jiffies_64
;
SECTIONS
SECTIONS
{
{
. =
@CONFIG_ETRAX_DRAM_VIRTUAL_BASE@
;
.
=
0
x
##
CONFIG_ETRAX_DRAM_VIRTUAL_BASE
;
dram_start
=
.
;
dram_start
=
.
;
ibr_start
=
.
;
ibr_start
=
.
;
.
=
.
+
0x4000
; /* see head.S and pages reserved at the start */
.
=
.
+
0x4000
; /* see head.S and pages reserved at the start */
...
@@ -99,5 +101,5 @@ SECTIONS
...
@@ -99,5 +101,5 @@ SECTIONS
*(.
exitcall.exit
)
*(.
exitcall.exit
)
}
}
dram_end = dram_start +
@CONFIG_ETRAX_DRAM_SIZE_M@
*1024*1024;
dram_end
=
dram_start
+
CONFIG_ETRAX_DRAM_SIZE
*
1024
*
1024
;
}
}
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