Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
rockchip_bionic
Commits
fe62de1a
Commit
fe62de1a
authored
15 years ago
by
David 'Digit' Turner
Browse files
Options
Download
Email Patches
Plain Diff
Add support for R_ARM_REL32 to the dynamic linker.
Merged from eclair-mr2
parent
cd5df2d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
linker/linker.c
linker/linker.c
+7
-0
linker/linker.h
linker/linker.h
+7
-6
No files found.
linker/linker.c
View file @
fe62de1a
...
...
@@ -1294,6 +1294,13 @@ static int reloc_library(soinfo *si, Elf32_Rel *rel, unsigned count)
reloc
,
sym_addr
,
sym_name
);
*
((
unsigned
*
)
reloc
)
+=
sym_addr
;
break
;
case
R_ARM_REL32
:
COUNT_RELOC
(
RELOC_RELATIVE
);
MARK
(
rel
->
r_offset
);
TRACE_TYPE
(
RELO
,
"%5d RELO REL32 %08x <- %08x - %08x %s
\n
"
,
pid
,
reloc
,
sym_addr
,
rel
->
r_offset
,
sym_name
);
*
((
unsigned
*
)
reloc
)
+=
sym_addr
-
rel
->
r_offset
;
break
;
#elif defined(ANDROID_X86_LINKER)
case
R_386_JUMP_SLOT
:
COUNT_RELOC
(
RELOC_ABSOLUTE
);
...
...
This diff is collapsed.
Click to expand it.
linker/linker.h
View file @
fe62de1a
...
...
@@ -159,6 +159,13 @@ extern soinfo libdl_info;
#define R_ARM_JUMP_SLOT 22
#define R_ARM_RELATIVE 23
/* According to the AAPCS specification, we only
* need the above relocations. However, in practice,
* the following ones turn up from time to time.
*/
#define R_ARM_ABS32 2
#define R_ARM_REL32 3
#elif defined(ANDROID_X86_LINKER)
#define R_386_32 1
...
...
@@ -194,12 +201,6 @@ extern soinfo libdl_info;
#define DT_PREINIT_ARRAYSZ 33
#endif
/* in theory we only need the above relative relocations,
but in practice the following one turns up from time
to time. fushigi na.
*/
#define R_ARM_ABS32 2
soinfo
*
find_library
(
const
char
*
name
);
unsigned
unload_library
(
soinfo
*
si
);
Elf32_Sym
*
lookup_in_library
(
soinfo
*
si
,
const
char
*
name
);
...
...
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