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


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

No that will not work.  If you cross compile the unsigned long with be 32-bit,
but we may need a 64-bit value.  It works better like this..

Index: 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 10:58:44
@@ -1051,7 +1051,7 @@
      char *sect, *valstr;
 {
   char *end;
-  unsigned long val = strtoul (valstr, &end, 16);
+  bfd_vma val = bfd_scan_vma (valstr, &end, 16);
   if (*end)
     einfo (_("%P%F: invalid hex number `%s'\n"), valstr);
   lang_section_start (sect, exp_intop (val));



Ulf


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