> in the ld directory, look for assignments to rd->add from calls to
> e32. two do not do a cast to int32. try casting those two and let me
> know if you can
I made this change and it doesn't seem to fix the problem.
diff -r 3478ecc801f6 src/cmd/ld/ldelf.c
--- a/src/cmd/ld/ldelf.c Wed May 01 10:00:05 2013 -0400
+++ b/src/cmd/ld/ldelf.c Wed May 01 19:15:00 2013 +0000
@@ -706,7 +706,7 @@
else {
// load addend from image
if(rp->siz == 4)
- rp->add = e->e32(sect->base+rp->off);
+ rp->add =
(int32)e->e32(sect->base+rp->off);
else if(rp->siz == 8)
rp->add = e->e64(sect->base+rp->off);
else
diff -r 3478ecc801f6 src/cmd/ld/ldpe.c
--- a/src/cmd/ld/ldpe.c Wed May 01 10:00:05 2013 -0400
+++ b/src/cmd/ld/ldpe.c Wed May 01 19:15:00 2013 +0000
@@ -297,7 +297,7 @@
case IMAGE_REL_I386_DIR32:
rp->type = D_ADDR;
// load addend from image
- rp->add = le32(rsect->base+rp->off);
+ rp->add =
(int32)le32(rsect->base+rp->off);
break;
case IMAGE_REL_AMD64_ADDR64: // R_X86_64_64
rp->siz = 8;
--
David du Colombier