2
0
mirror of https://github.com/bebbo/amigaos-binutils-2.14.git synced 2025-12-08 22:38:24 +00:00

Fix assembler output of the non-bfd version when running on a 64bit host.

* gas/config/aout_gnu.h (BYTES_IN_WORD): New define.
  (struct exec_bytes): Use it.
  (EXEC_BYTES_SIZE): Likewise.
* gas/config/obj-aout.c (CROSS_COMPILE): Convert to a compile time constant
  of 0 or 1.
  (obj_header_append): Use "struct exec_bytes" when cross compiling.
  (obj_symbol_to_chars): Output symbol data with a local "struct nlist_bytes"
  utilizing BYTES_IN_WORD.
  (obj_crawl_symbol_chain): Ignore symbols without a valid name like BFD.
  (obj_emit_strings): Use BYTES_IN_WORD to output string table size when
  cross compiling.
  Suppress symbols without a valid name like BFD.
* gas/write.c (write_object_file): Replace "sizeof (string_byte_count)" with
  BYTES_IN_WORD.
This commit is contained in:
Gunther Nikl
2014-11-16 18:42:30 +00:00
parent 29a0d609c6
commit c796c52d23
3 changed files with 59 additions and 44 deletions

View File

@ -1611,11 +1611,11 @@ write_object_file ()
Count the number of string-table chars we will emit.
Put this info into the headers as appropriate. */
know (zero_address_frag.fr_address == 0);
string_byte_count = sizeof (string_byte_count);
string_byte_count = BYTES_IN_WORD;
obj_crawl_symbol_chain (&headers);
if (string_byte_count == sizeof (string_byte_count))
if (string_byte_count == BYTES_IN_WORD)
string_byte_count = 0;
H_SET_STRING_SIZE (&headers, string_byte_count);