Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 5.5k
    • Issues 5.5k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 637
    • Merge requests 637
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #20758

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 Nov 29, 2021 by Simon Jakobi
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking