Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
9d0ac836
Unverified
Commit
9d0ac836
authored
6 years ago
by
Soby Mathew
Committed by
GitHub
6 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #1880 from lmayencourt/lm/pie
PIE: fix linking with pie and binutils > 2.27
parents
b79239db
80e19897
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
v2.2
v2.2-rc2
v2.2-rc1
v2.2-rc0
v2.1
v2.1-rc1
v2.1-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+1
-1
Makefile
lib/aarch64/misc_helpers.S
+4
-4
lib/aarch64/misc_helpers.S
with
5 additions
and
5 deletions
+5
-5
Makefile
View file @
9d0ac836
...
...
@@ -371,7 +371,7 @@ endif
ifeq
($(ENABLE_PIE),1)
TF_CFLAGS
+=
-fpie
TF_LDFLAGS
+=
-pie
TF_LDFLAGS
+=
-pie
--no-dynamic-linker
else
PIE_FOUND
:=
$(
findstring
--enable-default-pie
,
${GCC_V_OUTPUT}
)
ifneq
($(PIE_FOUND),)
...
...
This diff is collapsed.
Click to expand it.
lib/aarch64/misc_helpers.S
View file @
9d0ac836
...
...
@@ -531,8 +531,8 @@ func fixup_gdt_reloc
#endif
/
*
*
Calculate
the
offset
based
on
return
address
in
x30
.
*
Assume
that
this
funtion
is
called
within
a
page
of
the
start
of
*
of
fixup
region
.
*
Assume
that
this
fun
c
tion
is
called
within
a
page
at
the
start
of
*
fixup
region
.
*/
and
x2
,
x30
,
#
~
(
PAGE_SIZE
-
1
)
sub
x0
,
x2
,
x6
/*
Diff
(
S
)
=
Current
Address
-
Compiled
Address
*/
...
...
@@ -580,13 +580,13 @@ func fixup_gdt_reloc
*
*
r_offset
is
address
of
reference
*
r_info
is
symbol
index
and
type
of
relocation
(
in
this
case
*
0x403
which
corresponds
to
R_AARCH64_RELATIV
)
.
*
0x403
which
corresponds
to
R_AARCH64_RELATIV
E
)
.
*
r_addend
is
constant
part
of
expression
.
*
*
Size
of
Elf64_Rela
structure
is
24
bytes
.
*/
1
:
/
*
Assert
that
the
relocation
type
is
R_AARCH64_RELATIV
*/
/
*
Assert
that
the
relocation
type
is
R_AARCH64_RELATIV
E
*/
#if ENABLE_ASSERTIONS
ldr
x3
,
[
x1
,
#
8
]
cmp
x3
,
#
0x403
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help