Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
a83cc09f
Commit
a83cc09f
authored
Jan 12, 1996
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for .sdata/.sbss/.sdata2/.sbss2
From-SVN: r10968
parent
3c0f5ae6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
26 deletions
+92
-26
gcc/config/rs6000/eabi-ci.asm
+28
-5
gcc/config/rs6000/eabi-cn.asm
+33
-6
gcc/config/rs6000/eabi.asm
+31
-15
No files found.
gcc/config/rs6000/eabi-ci.asm
View file @
a83cc09f
...
...
@@ -50,27 +50,50 @@ __GOT_START__:
_GLOBAL_OFFSET_TABLE_
:
_SDA_BASE_
:
.
section
".got1"
,
"w"
.
section
".got1"
,
"
a
w"
.
globl
__GOT1_START__
.
type
__GOT1_START__
,
@
object
__GOT1_START__
:
.
section
".got2"
,
"w"
.
section
".got2"
,
"
a
w"
.
globl
__GOT2_START__
.
type
__GOT2_START__
,
@
object
__GOT2_START__
:
.
section
".fixup"
,
"w"
.
section
".fixup"
,
"
a
w"
.
globl
__FIXUP_START__
.
type
__FIXUP_START__
,
@
object
__FIXUP_START__
:
.
section
".ctors"
,
"w"
.
section
".ctors"
,
"
a
w"
.
globl
__CTOR_LIST__
.
type
__CTOR_LIST__
,
@
object
__CTOR_LIST__
:
.
section
".dtors"
,
"w"
.
section
".dtors"
,
"
a
w"
.
globl
__DTOR_LIST__
.
type
__DTOR_LIST__
,
@
object
__DTOR_LIST__
:
.
section
".sdata"
,
"aw"
.
globl
__SDATA_START__
.
type
__SDATA_START__
,
@
object
__SDATA_START__
:
.
section
".sbss"
,
"aw"
.
globl
__SBSS_START__
.
type
__SBSS_START__
,
@
object
__SBSS_START__
:
.
section
".sdata2"
,
"aw"
.
globl
_SDA2_BASE_
.
type
_SDA2_BASE_
,
@
object
.
globl
__SDATA2_START__
.
type
__SDATA2_START__
,
@
object
__SDATA2_START__
:
_SDA2_BASE_
=
.
+
32768
.
section
".sbss2"
,
"aw"
.
globl
__SBSS2_START__
.
type
__SBSS2_START__
,
@
object
__SBSS2_START__
:
gcc/config/rs6000/eabi-cn.asm
View file @
a83cc09f
...
...
@@ -39,32 +39,59 @@
.
file
"crtn.s"
.
ident
"GNU C crtn.s"
.
section
".got"
,
"w"
.
section
".got"
,
"
a
w"
.
globl
__GOT_END__
.
type
__GOT_END__
,
@
object
__GOT_END__
:
.
section
".got1"
,
"w"
.
section
".got1"
,
"
a
w"
.
globl
__GOT1_END__
.
type
__GOT1_END__
,
@
object
__GOT1_END__
:
.
section
".got2"
,
"w"
.
section
".got2"
,
"
a
w"
.
globl
__GOT2_END__
.
type
__GOT2_END__
,
@
object
__GOT2_END__
:
.
section
".fixup"
,
"w"
.
section
".fixup"
,
"
a
w"
.
globl
__FIXUP_END__
.
type
__FIXUP_END__
,
@
object
__FIXUP_END__
:
.
section
".ctors"
,
"w"
.
section
".ctors"
,
"
a
w"
.
globl
__CTOR_END__
.
type
__CTOR_END__
,
@
object
__CTOR_END__
:
.
section
".dtors"
,
"w"
.
section
".dtors"
,
"
a
w"
.
globl
__DTOR_END__
.
type
__DTOR_END__
,
@
object
__DTOR_END__
:
#
Put
a
blrl
instruction
in
the
special
.
got
.
blrl
section
,
which
#
the
GNU
linker
puts
at
_GLOBAL_OFFSET_TABLE
-
4
,
so
that
a
program
#
can
find
the
_GLOBAL_OFFSET_TABLE_
address
in
a
painless
fashion
.
.
section
".got.blrl"
,
"awx"
blrl
.
section
".sdata"
,
"aw"
.
globl
__SDATA_END__
.
type
__SDATA_END__
,
@
object
__SDATA_END__
:
.
section
".sbss"
,
"aw"
.
globl
__SBSS_END__
.
type
__SBSS_END__
,
@
object
__SBSS_END__
:
.
section
".sdata2"
,
"aw"
.
globl
__SDATA2_END__
.
type
__SDATA2_END__
,
@
object
__SDATA2_END__
:
.
section
".sbss2"
,
"aw"
.
globl
__SBSS2_END__
.
type
__SBSS2_END__
,
@
object
__SBSS2_END__
:
gcc/config/rs6000/eabi.asm
View file @
a83cc09f
...
...
@@ -48,14 +48,23 @@
.
Ltable
=
.
-
.
LCTOC1
.
long
.
LCTOC1
/*
address
we
are
really
at
*/
.
L
got
=
.
-
.
LCTOC1
.
long
_
GLOBAL_OFFSET_TABLE_
/*
normal
GOT
address
*/
.
L
sda
=
.
-
.
LCTOC1
.
long
_
SDA_BASE_
/*
address
of
the
first
small
data
area
*/
.
L
got
s
=
.
-
.
LCTOC1
.
long
__
GOT_START__
/*
start
of
.
got
section
*/
.
L
sda
s
=
.
-
.
LCTOC1
.
long
__
SDATA_START__
/*
start
of
.
sdata
/
.
sbss
section
*/
.
Lgote
=
.
-
.
LCTOC1
.
long
__GOT_END__
/*
end
of
.
got
section
*/
.
Lsdae
=
.
-
.
LCTOC1
.
long
__SBSS_END__
/*
end
of
.
sdata
/
.
sbss
section
*/
.
Lsda2
=
.
-
.
LCTOC1
.
long
_SDA2_BASE_
/*
address
of
the
second
small
data
area
*/
.
Lsda2s
=
.
-
.
LCTOC1
.
long
__SDATA2_START__
/*
start
of
.
sdata2
/
.
sbss2
section
*/
.
Lsda2e
=
.
-
.
LCTOC1
.
long
__SBSS2_END__
/*
end
of
.
sdata2
/
.
sbss2
section
*/
.
Lgot2s
=
.
-
.
LCTOC1
.
long
__GOT2_START__
/*
-
mrelocatable
GOT
pointers
start
*/
...
...
@@ -110,20 +119,27 @@ FUNC_START(__eabi)
stwx
1
,
10
,
12
/*
store
a
non
-
zero
value
in
the
done
flag
*/
bne
0
,.
Lreloc
/*
skip
if
we
need
to
relocate
*/
/*
Only
load
up
register
2
if
there
is
a
.
got
section
*/
/*
Only
load
up
register
13
if
there
is
a
.
sdata
and
/
or
.
sbss
section
*/
lwz
3
,.
Lgots
(
11
)
/*
start
of
.
got
section
*/
lwz
4
,.
Lgote
(
11
)
/*
end
of
.
got
section
*/
cmpw
1
,
3
,
4
/*
.
got
section
non
-
empty
?
*/
bc
12
,
6
,.
Ldone
lwz
3
,.
Lsdas
(
11
)
/*
start
of
.
sdata
/
.
sbss
section
*/
lwz
4
,.
Lsdae
(
11
)
/*
end
of
.
sdata
/
.
sbss
section
*/
cmpw
1
,
3
,
4
/*
.
sdata
/
.
sbss
section
non
-
empty
?
*/
beq
1
,.
Lsda2l
/*
skip
loading
r13
*/
lwz
13
,.
Lsda
(
11
)
/*
load
r13
with
_SDA_BASE
address
*/
/*
Only
load
up
register
2
if
there
is
a
.
sdata2
and
/
or
.
sbss2
section
*/
/*
Normal
program
,
load
up
register
2
*/
.
Lsda2l
:
lwz
3
,.
Lsda2s
(
11
)
/*
start
of
.
sdata
/
.
sbss
section
*/
lwz
4
,.
Lsda2e
(
11
)
/*
end
of
.
sdata
/
.
sbss
section
*/
cmpw
1
,
3
,
4
/*
.
sdata
/
.
sbss
section
non
-
empty
?
*/
beq
1
,.
Ldone
/*
skip
loading
r2
*/
lwz
2
,.
Lgot
(
11
)
/*
normal
GOT
address
(
obsolete
in
register
2
)
*/
mr
13
,
2
/*
also
same
as
_SDA_BASE_
(
V
.
4
small
data
ptr
)
*/
lwz
2
,.
Lsda2
(
11
)
/*
load
r2
with
_SDA2_BASE
address
*/
b
FUNC_NAME
(
__do_global_ctors
)
/*
do
any
C
++
global
constructors
(
which
returns
to
caller
)
*/
/*
We
need
to
relocate
the
.
got2
pointers
.
Don
'
t
load
register
2
*/
/*
We
need
to
relocate
the
.
got2
pointers
.
Don
'
t
load
register
s
2
or
13
*/
.
Lreloc
:
lwz
3
,.
Lgot2s
(
11
)
/*
GOT
pointers
start
*/
...
...
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