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
dcceb381
Commit
dcceb381
authored
Jun 16, 1994
by
Richard M. Stallman
Browse files
(make_hdr): Handle case of no "additional header".
parent
ebfbbbe4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/unexec.c
src/unexec.c
+4
-1
No files found.
src/unexec.c
View file @
dcceb381
...
...
@@ -490,6 +490,7 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
block_copy_start
+=
sizeof
(
f_ohdr
);
}
/* Loop through section headers, copying them in */
lseek
(
a_out
,
sizeof
(
f_hdr
)
+
f_hdr
.
f_opthdr
,
0
);
for
(
scns
=
f_hdr
.
f_nscns
;
scns
>
0
;
scns
--
)
{
if
(
read
(
a_out
,
&
scntemp
,
sizeof
(
scntemp
))
!=
sizeof
(
scntemp
))
{
...
...
@@ -657,7 +658,9 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
* will not adjust the file pointer for that section correctly.
*/
lseek (a_out, sizeof (f_hdr) + sizeof (f_ohdr), 0);
/* This used to use sizeof (f_ohdr) instead of .f_opthdr.
.f_opthdr is said to be right when there is no optional header. */
lseek
(
a_out
,
sizeof
(
f_hdr
)
+
f_hdr
.
f_opthdr
,
0
);
for
(
scns
=
f_hdr
.
f_nscns
;
scns
>
0
;
scns
--
)
{
...
...
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