Bug 14976 – object file output is unstable/different

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-08-29T11:38:48Z
Last change time
2024-12-13T18:44:23Z
Assigned to
No Owner
Creator
Martin Nowak
Moved to GitHub: dmd#19034 →

Comments

Comment #0 by code — 2015-08-29T11:38:48Z
The order in which undefined symbols are emitted depend on the allocated address of symbols (which in turn change with ASLR). This is problematic for testing purposes but also prevents from caching linker steps. https://github.com/D-Programming-Language/dmd/blob/20771f89a16d9ab663b2964db8d49706cfa0e1dd/src/backend/cgen.c#L501 A solution would be to use a string table instead of AArray.
Comment #1 by ibuclaw — 2016-09-25T14:45:33Z
*** Issue 16185 has been marked as a duplicate of this issue. ***
Comment #2 by code — 2017-02-12T14:48:35Z
A common solution in other compilers (clang) is to use an ordered hash table, consisting of a hash table for O(1) access and an array for ordered processing. Would be a good fit here as well. http://llvm.org/docs/doxygen/html/classllvm_1_1MapVector.html
Comment #3 by robert.schadek — 2024-12-13T18:44:23Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19034 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB