Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7d713448
Commit
7d713448
authored
Aug 19, 1996
by
Richard M. Stallman
Browse files
(unexec): Copy the .got section.
parent
3c5ddb48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
src/unexalpha.c
src/unexalpha.c
+17
-0
No files found.
src/unexalpha.c
View file @
7d713448
...
...
@@ -266,6 +266,8 @@ unexec (new_name, a_name, data_start, bss_start, entry_address)
#ifdef _GOT
if
(
got_section
!=
NULL
)
{
bcopy
(
got_section
,
buffer
,
sizeof
(
struct
scnhdr
));
got_section
->
s_vaddr
=
vaddr
;
got_section
->
s_paddr
=
vaddr
;
got_section
->
s_size
=
0
;
...
...
@@ -292,6 +294,21 @@ unexec (new_name, a_name, data_start, bss_start, entry_address)
WRITE
(
new
,
(
char
*
)
DATA_START
,
nhdr
.
aout
.
dsize
,
"writing data section to %s"
,
new_name
);
#ifdef _GOT
#define old_got_section ((struct scnhdr *)buffer)
if
(
got_section
!=
NULL
)
{
SEEK
(
new
,
old_got_section
->
s_scnptr
,
"seeking to start of got_section in %s"
,
new_name
);
WRITE
(
new
,
oldptr
+
old_got_section
->
s_scnptr
,
old_got_section
->
s_size
,
"writing new got_section of %s"
,
new_name
);
SEEK
(
new
,
nhdr
.
aout
.
tsize
+
nhdr
.
aout
.
dsize
,
"seeking to end of data section of %s"
,
new_name
);
}
#undef old_got_section
#endif
/*
* Construct new symbol table header
...
...
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