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
94f4fb08
Commit
94f4fb08
authored
Sep 12, 2016
by
Vineet Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARC: module: support R_ARC_32_PCREL relocation
Signed-off-by:
Vineet Gupta
<
vgupta@synopsys.com
>
parent
e0d5321f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
arch/arc/include/asm/elf.h
arch/arc/include/asm/elf.h
+1
-2
arch/arc/kernel/module.c
arch/arc/kernel/module.c
+4
-2
No files found.
arch/arc/include/asm/elf.h
View file @
94f4fb08
...
@@ -23,8 +23,7 @@
...
@@ -23,8 +23,7 @@
/* ARC Relocations (kernel Modules only) */
/* ARC Relocations (kernel Modules only) */
#define R_ARC_32 0x4
#define R_ARC_32 0x4
#define R_ARC_32_ME 0x1B
#define R_ARC_32_ME 0x1B
#define R_ARC_S25H_PCREL 0x10
#define R_ARC_32_PCREL 0x31
#define R_ARC_S25W_PCREL 0x11
/*to set parameters in the core dumps */
/*to set parameters in the core dumps */
#define ELF_ARCH EM_ARCOMPACT
#define ELF_ARCH EM_ARCOMPACT
...
...
arch/arc/kernel/module.c
View file @
94f4fb08
...
@@ -106,10 +106,12 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
...
@@ -106,10 +106,12 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
*/
*/
relo_type
=
ELF32_R_TYPE
(
rel_entry
[
i
].
r_info
);
relo_type
=
ELF32_R_TYPE
(
rel_entry
[
i
].
r_info
);
if
(
likely
(
R_ARC_32_ME
==
relo_type
))
if
(
likely
(
R_ARC_32_ME
==
relo_type
))
/* ME ( S + A ) */
arc_write_me
((
unsigned
short
*
)
location
,
relocation
);
arc_write_me
((
unsigned
short
*
)
location
,
relocation
);
else
if
(
R_ARC_32
==
relo_type
)
else
if
(
R_ARC_32
==
relo_type
)
/* ( S + A ) */
*
((
Elf32_Addr
*
)
location
)
=
relocation
;
*
((
Elf32_Addr
*
)
location
)
=
relocation
;
else
if
(
R_ARC_32_PCREL
==
relo_type
)
/* ( S + A ) - PDATA ) */
*
((
Elf32_Addr
*
)
location
)
=
relocation
-
location
;
else
else
goto
relo_err
;
goto
relo_err
;
...
...
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