Mail Archives: cygwin/1997/07/24/01:51:53
--
--PART-BOUNDARY=.19707241002.ZM26535.kehl.dalim.de
Content-Type: text/plain; charset=us-ascii
Hi,
I have found the problem with generation of dll on SGI IRIX 6.2.
The problem was located in generation of base file in ld, and not in dlltool
....
In bfd/cofflink.c we have this kind of code:
bfd_vma addr = ...
...
fwrite (&addr, 1,4, (FILE *) info->base_file);
the problem is that on SGI a bfd_vma is a "long long" (size 64 bits), so only
the 4 first bytes (which are always 0) are written.
For fixing this bug we only have to cast addr in a 32 bits value. My problem is
that the type "uint32" doesn't exist anymore, so I used a cast to "long",
hoping that the size of "long" is always 32 bits (???????).
May be can somebody find a cleaner solution, in this case send me a mail.
You can find, attached to this mail, the corresponding diff file.
Best regards.
--
==========================================================================
| Philippe GIACINTI |
| |
| DALiM GmbH R&D email: giac AT dalim DOT de |
| Daimler Strasse 2, tel: +49.7851.9196-28 |
| D-77694 Kehl-Sundheim Germany fax: +49.7851.73576 |
| |
==========================================================================
--PART-BOUNDARY=.19707241002.ZM26535.kehl.dalim.de
X-Zm-Content-Name: PatchSgiIrix62
Content-Description: Text
Content-Type: text/plain ; name="PatchSgiIrix62" ; charset=us-ascii
--- bfd/cofflink.c~ Tue Apr 15 10:21:58 1997
+++ bfd/cofflink.c Thu Jul 24 09:32:47 1997
@@ -2499,6 +2499,7 @@
/* relocation to a symbol in a section which
isn't absolute - we output the address here
to a file */
+ long addr32;
bfd_vma addr = rel->r_vaddr
- input_section->vma
+ input_section->output_offset
@@ -2506,7 +2507,9 @@
if (coff_data(output_bfd)->pe)
addr -= pe_data(output_bfd)->pe_opthdr.ImageBase;
/* FIXME: Shouldn't 4 be sizeof (addr)? */
- fwrite (&addr, 1,4, (FILE *) info->base_file);
+ /* FIXME: always cast addr to long (hope long size is 32 bits) */
+ addr32 = (long)addr;
+ fwrite (&addr32, 1,4, (FILE *) info->base_file);
}
}
--PART-BOUNDARY=.19707241002.ZM26535.kehl.dalim.de--
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -