mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-26 23:31:55 -08:00
(make_hdr): Handle case of no "additional header".
This commit is contained in:
parent
ebfbbbe463
commit
dcceb381ab
1 changed files with 4 additions and 1 deletions
|
|
@ -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--)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue