This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch for 64-bit change address in 32-bit environment


>>>>> Ian Lance Taylor writes:

Ian>    Date: Sun, 9 Apr 2000 00:11:06 -0700 (PDT)
Ian>    From: Ulf Carlsson <ulfc@calypso.engr.sgi.com>

Ian>    The current implementation of set_section_start() can't handle 64-bit addresses
Ian>    if you've compiled the 64-bit linker in a 32-bit environment.  The problem
Ian>    is that strtoul() uses unsigned longs.  I have attached a workaround for this.

Ian>    2000-04-09  Ulf Carlsson  <ulfc@engr.sgi.com>

Ian> 	   * lexsup.c (set_section_start): Handle 64-bit addresses is 32-bit
Ian> 	   compiling  environments.

Ian> Thanks for the patch.

Ian> I think we should probably just use bfd_scan_vma instead of strtoul.

Like this?  Ulf, does this also work for you?

Andreas

2000-05-03  Andreas Jaeger  <aj@suse.de>

	* lexsup.c (set_section_start): Use bfd_scan_vma instead of
	strtoul.

Index: ld/lexsup.c
===================================================================
RCS file: /cvs/src/src/ld/lexsup.c,v
retrieving revision 1.9
diff -u -r1.9 lexsup.c
--- lexsup.c	2000/04/04 14:32:33	1.9
+++ lexsup.c	2000/05/03 08:58:33
@@ -1051,7 +1051,7 @@
      char *sect, *valstr;
 {
   char *end;
-  unsigned long val = strtoul (valstr, &end, 16);
+  unsigned long val = bfd_scan_vma (valstr, (CONST char **)&end, 16);
   if (*end)
     einfo (_("%P%F: invalid hex number `%s'\n"), valstr);
   lang_section_start (sect, exp_intop (val));



-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]