Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Oct 2001 12:11:40 -0700
From:      Peter Wemm <peter@wemm.org>
To:        obrien@nuxi.com, dfr@nlsystems.com
Cc:        ia64@freebsd.org
Subject:   Fixes for ia64 on in-tree binutils
Message-ID:  <20011023191140.82005380A@overcee.netplex.com.au>

index | next in thread | raw e-mail

The first one solves ia64_info->fptr_sec et al from being trashed by
the default MALLOC_OPTIONS AJ.  The second is a potentially fatal
int/long pointer mistake on LP64 systems.

[FYI to people on the list, dfr and obrien already know this]
Also, to get a working assembler, you need to grab
  http://people.freebsd.org/~peter/ia64-asmtab.c
and replace the src/contrib/binutils/opcodes/ia64-asmtab.c version which
got trashed before binutils-2.11.2 was released (64 bit numbers got
truncated to 32 bit)

Index: elfxx-ia64.c
===================================================================
RCS file: /home/ncvs/src/contrib/binutils/bfd/elfxx-ia64.c,v
retrieving revision 1.1.1.1
diff -u -2 -u -r1.1.1.1 elfxx-ia64.c
--- elfxx-ia64.c	2001/10/13 01:47:45	1.1.1.1
+++ elfxx-ia64.c	2001/10/23 19:05:52
@@ -1303,5 +1303,4 @@
      new_hash_entry_func new;
 {
-  memset (ht, 0, sizeof (*ht));
   return bfd_hash_table_init (&ht->root, new);
 }
@@ -1441,4 +1440,5 @@
   if (!ret)
     return 0;
+  memset (ret, 0, sizeof (*ret));
   if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
 				      elfNN_ia64_new_elf_hash_entry))
Index: peXXigen.c
===================================================================
RCS file: /home/ncvs/src/contrib/binutils/bfd/peXXigen.c,v
retrieving revision 1.1.1.1
diff -u -2 -u -r1.1.1.1 peXXigen.c
--- peXXigen.c	2001/06/26 16:56:37	1.1.1.1
+++ peXXigen.c	2001/10/23 19:05:52
@@ -1806,4 +1806,5 @@
   struct internal_extra_pe_aouthdr *i = &pe->pe_opthdr;
   const char *subsystem_name = NULL;
+  time_t t;
 
   /* The MS dumpbin program reportedly ands with 0xff0f before
@@ -1826,5 +1827,6 @@
 
   /* ctime implies '\n'.  */
-  fprintf (file, "\nTime/Date\t\t%s", ctime (&pe->coff.timestamp));
+  t = pe->coff.timestamp;
+  fprintf (file, "\nTime/Date\t\t%s", ctime (&t));
   fprintf (file, "\nImageBase\t\t");
   fprintf_vma (file, i->ImageBase);

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ia64" in the body of the message



help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011023191140.82005380A>