Skip to content

PPC NCG: Do not generate redundant section directives for exported symbols

Summary

In #18237 (closed) we found a duplication of .section ".toc","aw" directives. All symbols are printed at the end of code generation and hence one directive would be sufficient and repeating the directive for each symbol leads to assembler files that are much larger than necessary.

Steps to reproduce

Compile any Haskell or Cmm file to assembler code and look for .section directives.

Expected behavior

Have a single .section declaration for TOC.

Environment

  • GHC version used: HEAD, but also present since we have PPC NCG on powerpc64

Optional:

  • Operating System: Linux, FreeBSD
  • System Architecture: powerpc64 (perhaps also powerpc64le)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information