Compilation with -fproc-alignment=64 results in warnings from ld.gold
When I use -fproc-alignment=64
to get more comparable benchmark results in unordered-containers
, ld.gold
emits several warnings that make me wonder whether code layout issues are mitigated effectively or not:
$ cabal bench
...
/usr/bin/ld.gold: warning: /home/simon/src/unordered-containers/dist-newstyle/build/x86_64-linux/ghc-9.0.1/unordered-containers-0.2.15.0/build/Data/HashMap/Internal.dyn_o: section .rodata.str contains incorrectly aligned strings; the alignment of those strings won't be preserved
/usr/bin/ld.gold: warning: /home/simon/src/unordered-containers/dist-newstyle/build/x86_64-linux/ghc-9.0.1/unordered-containers-0.2.15.0/build/Data/HashMap/Internal/Array.dyn_o: section .rodata.str contains incorrectly aligned strings; the alignment of those strings won't be preserved
/usr/bin/ld.gold: warning: /home/simon/src/unordered-containers/dist-newstyle/build/x86_64-linux/ghc-9.0.1/unordered-containers-0.2.15.0/build/Data/HashMap/Internal/Strict.dyn_o: section .rodata.str contains incorrectly aligned strings; the alignment of those strings won't be preserved
/usr/bin/ld.gold: warning: /home/simon/src/unordered-containers/dist-newstyle/build/x86_64-linux/ghc-9.0.1/unordered-containers-0.2.15.0/build/Data/HashSet/Internal.dyn_o: section .rodata.str contains incorrectly aligned strings; the alignment of those strings won't be preserved
...
/usr/bin/ld.gold: warning: /home/simon/src/unordered-containers/dist-newstyle/build/x86_64-linux/ghc-9.0.1/unordered-containers-0.2.15.0/b/benchmarks/build/benchmarks/benchmarks-tmp/Main.o: section .rodata.str contains incorrectly aligned strings; the alignment of those strings won't be preserved
/usr/bin/ld.gold: warning: /home/simon/src/unordered-containers/dist-newstyle/build/x86_64-linux/ghc-9.0.1/unordered-containers-0.2.15.0/build/libHSunordered-containers-0.2.15.0-inplace.a(Internal.o): section .rodata.str contains incorrectly aligned strings; the alignment of those strings won't be preserved
/usr/bin/ld.gold: warning: /home/simon/src/unordered-containers/dist-newstyle/build/x86_64-linux/ghc-9.0.1/unordered-containers-0.2.15.0/build/libHSunordered-containers-0.2.15.0-inplace.a(Array.o): section .rodata.str contains incorrectly aligned strings; the alignment of those strings won't be preserved
/usr/bin/ld.gold: warning: /home/simon/src/unordered-containers/dist-newstyle/build/x86_64-linux/ghc-9.0.1/unordered-containers-0.2.15.0/build/libHSunordered-containers-0.2.15.0-inplace.a(Strict.o): section .rodata.str contains incorrectly aligned strings; the alignment of those strings won't be preserved
I was hoping that the user's guide would help me assess these warnings, but it doesn't.
GHC versions tried: 8.10.7, 9.0.1
Platform: Linux 5.11.0-40-generic x86_64
Edited by Simon Jakobi