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
b9700b82
Commit
b9700b82
authored
Mar 25, 2003
by
David Mosberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ia64: More module-loader fixing.
parent
70e1e33a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
arch/ia64/kernel/module.c
arch/ia64/kernel/module.c
+11
-6
No files found.
arch/ia64/kernel/module.c
View file @
b9700b82
...
...
@@ -313,10 +313,10 @@ static const struct plt_entry ia64_plt_template = {
};
static
int
patch_plt
(
struct
plt_entry
*
plt
,
unsigned
long
target_ip
,
unsigned
long
target_gp
)
patch_plt
(
struct
module
*
mod
,
struct
plt_entry
*
plt
,
long
target_ip
,
unsigned
long
target_gp
)
{
if
(
apply_imm64
((
struct
insn
*
)
(
plt
->
bundle
[
0
]
+
2
),
target_ip
)
&&
apply_imm64
((
struct
insn
*
)
(
plt
->
bundle
[
1
]
+
2
),
target_gp
))
if
(
apply_imm64
(
mod
,
(
struct
insn
*
)
(
plt
->
bundle
[
0
]
+
2
),
target_ip
)
&&
apply_imm64
(
mod
,
(
struct
insn
*
)
(
plt
->
bundle
[
1
]
+
2
),
target_gp
))
return
1
;
return
0
;
}
...
...
@@ -837,9 +837,14 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symind
* XXX Should have an arch-hook for running this after final section
* addresses have been selected...
*/
/* See if gp can cover the entire core module: */
uint64_t
gp
=
(
uint64_t
)
mod
->
module_core
+
MAX_LTOFF
/
2
;
if
((
mod
->
arch
.
got
->
sh_addr
+
mod
->
arch
.
got
->
sh_size
)
-
gp
>=
MAX_LTOFF
)
gp
=
mod
->
arch
.
got
->
sh_addr
+
mod
->
arch
.
got
->
sh_size
-
MAX_LTOFF
/
2
;
if
(
mod
->
core_size
>=
MAX_LTOFF
)
/*
* This takes advantage of fact that SHF_ARCH_SMALL gets allocated
* at the end of the module.
*/
gp
=
(
uint64_t
)
mod
->
module_core
+
mod
->
core_size
-
MAX_LTOFF
/
2
;
mod
->
arch
.
gp
=
gp
;
DEBUGP
(
"%s: placing gp at 0x%lx
\n
"
,
__FUNCTION__
,
gp
);
}
...
...
@@ -860,7 +865,7 @@ int
apply_relocate
(
Elf64_Shdr
*
sechdrs
,
const
char
*
strtab
,
unsigned
int
symindex
,
unsigned
int
relsec
,
struct
module
*
mod
)
{
printk
(
KERN_ERR
"module %s: REL relocs in section %u unsupported
\n
"
,
relsec
,
mod
->
name
);
printk
(
KERN_ERR
"module %s: REL relocs in section %u unsupported
\n
"
,
mod
->
name
,
relsec
);
return
-
ENOEXEC
;
}
...
...
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