mirror of
https://frontier.innolan.net/github/amigaos-binutils.git
synced 2025-11-19 19:49:57 +00:00
* (amiga_write_object_contents): Fix HUNK_DEBUG size calculation for 64bit hosts.
The broken code used the wrong structure for the size calculation. This bug was hidden on 32bit hosts since both structures have the same size on such hosts. The AmigaOS program loader refuses to load programs with a defective structure.
This commit is contained in:
@ -1475,9 +1475,9 @@ amiga_write_object_contents (abfd)
|
||||
|
||||
/* Write out HUNK_DEBUG, size, ZMAGIC, ... */
|
||||
n[0] = HUNK_DEBUG;
|
||||
n[1] = 3 + ((symbols * sizeof(struct internal_nlist) + str_size + 3) >> 2);
|
||||
n[1] = 3 + ((symbols * sizeof(struct external_nlist) + str_size + 3) >> 2);
|
||||
n[2] = ZMAGIC; /* Magic number */
|
||||
n[3] = symbols * sizeof(struct internal_nlist);
|
||||
n[3] = symbols * sizeof(struct external_nlist);
|
||||
n[4] = str_size;
|
||||
if (!write_longs (n, 5, abfd))
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user