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
Kirill Smelkov
linux
Commits
d127326d
Commit
d127326d
authored
Jan 01, 2003
by
Rusty Russell
Committed by
Linus Torvalds
Jan 01, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Modules: fix plt sections
Use ".init.plt" section consistently, and mark plt sections executable.
parent
e59e439b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
arch/ppc/kernel/module.c
arch/ppc/kernel/module.c
+3
-3
include/asm-ppc/module.h
include/asm-ppc/module.h
+2
-2
No files found.
arch/ppc/kernel/module.c
View file @
d127326d
...
@@ -108,15 +108,15 @@ int module_frob_arch_sections(Elf32_Ehdr *hdr,
...
@@ -108,15 +108,15 @@ int module_frob_arch_sections(Elf32_Ehdr *hdr,
{
{
unsigned
int
i
;
unsigned
int
i
;
/* Find .plt and .
pltini
t sections */
/* Find .plt and .
init.pl
t sections */
for
(
i
=
0
;
i
<
hdr
->
e_shnum
;
i
++
)
{
for
(
i
=
0
;
i
<
hdr
->
e_shnum
;
i
++
)
{
if
(
strcmp
(
secstrings
+
sechdrs
[
i
].
sh_name
,
".
plt.ini
t"
)
==
0
)
if
(
strcmp
(
secstrings
+
sechdrs
[
i
].
sh_name
,
".
init.pl
t"
)
==
0
)
me
->
arch
.
init_plt_section
=
i
;
me
->
arch
.
init_plt_section
=
i
;
else
if
(
strcmp
(
secstrings
+
sechdrs
[
i
].
sh_name
,
".plt"
)
==
0
)
else
if
(
strcmp
(
secstrings
+
sechdrs
[
i
].
sh_name
,
".plt"
)
==
0
)
me
->
arch
.
core_plt_section
=
i
;
me
->
arch
.
core_plt_section
=
i
;
}
}
if
(
!
me
->
arch
.
core_plt_section
||
!
me
->
arch
.
init_plt_section
)
{
if
(
!
me
->
arch
.
core_plt_section
||
!
me
->
arch
.
init_plt_section
)
{
printk
(
"Module doesn't contain .plt or .
plt.ini
t sections.
\n
"
);
printk
(
"Module doesn't contain .plt or .
init.pl
t sections.
\n
"
);
return
-
ENOEXEC
;
return
-
ENOEXEC
;
}
}
...
...
include/asm-ppc/module.h
View file @
d127326d
...
@@ -28,7 +28,7 @@ struct mod_arch_specific
...
@@ -28,7 +28,7 @@ struct mod_arch_specific
/* Make empty sections for module_frob_arch_sections to expand. */
/* Make empty sections for module_frob_arch_sections to expand. */
#ifdef MODULE
#ifdef MODULE
asm
(
".section .plt,
\"
a
ws
\"
,@nobits; .align 3; .previous"
);
asm
(
".section .plt,
\"
a
x
\"
,@nobits; .align 3; .previous"
);
asm
(
".section .
plt.init,
\"
aws
\"
,@nobits; .align 3; .previous"
);
asm
(
".section .
init.plt,
\"
ax
\"
,@nobits; .align 3; .previous"
);
#endif
#endif
#endif
/* _ASM_PPC_MODULE_H */
#endif
/* _ASM_PPC_MODULE_H */
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