2024-11-08 04:20 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000444mercuryBugpublic2018-01-12 17:33
Reporterwangp 
Assigned Towangp 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000444: static linking with musl crashes
DescriptionWhen using musl, static linking (i.e. --linkage static) causes the program to crash during initialisation of the GC. It has to do with passing the "-Wl,-defsym -Wl,_DYNAMIC=0" in the linking step. The program will not crash if _DYNAMIC is not defined.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000960

wangp (developer)

Without "-Wl,-defsym -Wl,_DYNAMIC=0", the binary DOES have a symbol _DYNAMIC but with a non-zero address:

bash-4.4$ nm -a hello | grep _DYNAMIC
00000000006dcdf8 d _DYNAMIC

bash-4.4$ ./hello
Hello, world

~0000961

wangp (developer)

Fixed by commit ee177a481
+Notes

-Issue History
Date Modified Username Field Change
2018-01-11 12:34 wangp New Issue
2018-01-11 12:50 wangp Note Added: 0000960
2018-01-12 17:33 wangp Assigned To => wangp
2018-01-12 17:33 wangp Status new => resolved
2018-01-12 17:33 wangp Resolution open => fixed
2018-01-12 17:33 wangp Note Added: 0000961
+Issue History