Bug 20036 – COFF: missing relocations in large object files
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2019-07-09T05:29:56Z
Last change time
2019-07-28T21:05:50Z
Assigned to
No Owner
Creator
Rainer Schuetze
Comments
Comment #0 by r.sagitario — 2019-07-09T05:29:56Z
If an COFF object file section has more than 65535 relocations, only a part of them are actually written to the object file:
__gshared int x = 7;
__gshared int*[70000] px = &x;
void main()
{
foreach(p; px)
assert(p && *p == 7);
}
Building on Windows with -m64 or -32mscoff causes the assertion to fail.
Comment #1 by dlang-bot — 2019-07-09T05:39:46Z
@rainers created dlang/dmd pull request #10153 "Issue 20036 - COFF: missing relocations in large object files" mentioning this issue:
- Issue 20036 - COFF: missing relocations in large object files
more than 65535 relocations must be encoded in the first relocation
https://github.com/dlang/dmd/pull/10153
Comment #2 by dlang-bot — 2019-07-09T07:01:52Z
dlang/dmd pull request #10153 "Issue 20036 - COFF: missing relocations in large object files" was merged into master:
- da787c36ef8d43a10491c0304dfdf4e4696d3d43 by Rainer Schuetze:
Issue 20036 - COFF: missing relocations in large object files
more than 65535 relocations must be encoded in the first relocation
https://github.com/dlang/dmd/pull/10153
Comment #3 by dkorpel — 2019-07-28T21:05:50Z
The PR is merged now. DLangbot didn't close it because there was no 'fix' in the commit message.