Skip to content

cmd/8l: fix "non-pc-relative relocation address is too big"  #7769

Closed
@gopherbot

Description

@gopherbot

by liu.kz.2010:

--- a/src/cmd/ld/ldpe.c    Sat Apr 12 14:00:53 2014 +0800
+++ b/src/cmd/ld/ldpe.c Sat Apr 12 15:55:33 2014 +0800
@@ -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;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions